|
Dude - here's the thing. I know it's hard to just quit, I didn't mean that. I'm telling you that if you have no experience in writing web applications, you should look for another job. THEN quit. Obviously, you have bills to pay and so on, but even if you get out of this one alive, your boss will still be an idiot, and will still give you jobs that you're not qualified for, because he can and he's dumb enough to think he'll save money that way.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OK THANKS LETS MAKE IT MORE ELABORATE
COLA COLB COLC
NAME AGE AMT
JOHN 25 500
ROSE 15 1200
RICE 50 500
DICK 70 200
NOW THE COLOMNS ARE COLOMNS ON EXCEL SHEET.THE NAME ON THE WORK SHEET1 IS PEOPLE AND THE SAME NAME EXISTS IN WORK SHEET TWO WITH WORKSHEET NAME AS BUYERS AS BELOW
COLA COLB COLC
NAME PROD LANGUAGE
RICE ORANGE ENGLISH
ROSE EGG FRENCH
DICK PEN GERMAN
JOHN BOOKS GERMAN
AN EXAMPLE OF MY OUTPUT FOR JOHN SHOULD BE ON TWO SHEEETS.THE PEOPLE SHEET AND THE BUYERS SHEET. LIKE BELOW
COLA COLB COLC
NAME AGE AMT
JOHN 25 500
15 1200
50 500
70 200
AND ON SHEET2(BUYERS)
COLA COLB COLC
NAME PROD LANGUAGE
ORANGE ENGLISH
EGG FRENCH
PEN GERMAN
JOHN BOOKS GERMAN
FROM THIS OUTPUT YOU CAN SEE THAT ALL OTHER NAMES ARE CLEARED AND JOHN STILL MAINTAINS ITS POSITION ON THE TABLE ON BOTH SHEETS.ALL OTHER NAMES ARE CLEARED SO THAT NO ONE COULD HAVE AN IDEA OF WHO OWNS THE VALUES.THIS MEANS THAT THE MACRO CODES SHOULD BE ABLE TO IDENTIFY THE NAME ON SHEET ONE , PICK IT,CLEAR THE OTHERS, AND GOTO SHEET 2, PICK THE SAME NAME, AND CLEAR THE OTHERS THEN SAVE THE SHEET FOR EACH PERSONS BY THEIR NAMES.THIS MEANS 4 SAVED SHEETS AND ON EACH IT SHOULD ONLY SHOW THE NAME OF THE PERSON IN QUESTION.
ALSO I NEED A CODE THAT WOULD CONVERT MY EXCEL SHEET TO PDF.CAN ANYONE PLS HELP ME?
|
|
|
|
|
First, STOP YELLING!
Second, do your own homework. We will not write your code for you. We will help you with your code, though, but you have to at least try to write it first.
Third, you'll need a third party component to convert, or print, the sheet into a .PDF file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Third, you'll need a third party component to convert, or print, the sheet into a .PDF file.
One of those can even be found here on CodeProject. Try the search thingy at the top.
|
|
|
|
|
Don't tell me. Tell the OP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I just replied to your post because I just wanted to add a little details of what you already stated (didnt want write everything again ).
|
|
|
|
|
Yeah, but the OP doesn't get an email that says you added this little tidbit. Only I get that notification.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
pls this is my code for conversion of my excel to pdf but it isnt working.dont know where i am going wrong
Sub run()
'
' Makes some preliminary checks of the arguments.
' Quits the application is any problem is found.
End Sub
' ***********************************************
' XLS2PDF
'
' Converts a Excel xlsument to PDF using Adobe
' Distiller.
'
' Input: C:\Documents and Settings\Administrator\Desktop\*.xls
' sXlsFile - Full path to Excel xlsument.
' sPDFFile - Optional full path to output file.
' If not specified the output PDF file
' will be the same as the sXlsFile except
' file extension will be .pdf.
Function XLS2PDF(sXlsFile, sPDFFile)
Dim fso ' As FileSystemObject
Dim wdo ' As Excel.Application
Dim wxls ' As Excel.xlsument
Dim wxlss ' As Excel.xlsuments
Dim sPrevPrinter ' As String
Dim oDistiller ' As PDFDistiller.PDFDistiller.1
Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1")
If oDistiller Is Nothing Then
WScript.Echo "Error: Cannot create PDF xlsument. Adobe Acrobat " +
"Distiller is not available! Quiting..."
WScript.Quit 1
End If
Set fso = CreateObject("Scripting.FileSystemObject")
Set wdo = CreateObject("Excel.Application")
Set wxlss = wdo.xlsuments
sTempFile = fso.GetSpecialFolder(TemporaryFolder) + "\" + fso.GetTempName()
sXlsFile = fso.GetAbsolutePathName(sXlsFile)
' Debug outputs...
If bShowDebug Then
WScript.Echo "Xls file = '" + sXlsFile + "'"
WScript.Echo "Temporary file = '" + sTempFile + "'"
WScript.Echo "PDF file = '" + sPDFFile + "'"
End If
sFolder = fso.GetParentFolderName(sXlsFile)
If Len(sPDFFile) = 0 Then
sPDFFile = fso.GetBaseName(sXlsFile) + ".pdf"
End If
If Len(fso.GetParentFolderName(sPDFFile)) = 0 Then
sPDFFile = sFolder + "\" + sPDFFile
End If
' Remember current active printer
sPrevPrinter = wdo.ActivePrinter
'wdo.ActivePrinter = "Acrobat PDFWriter"
wdo.ActivePrinter = "Acrobat Distiller"
' Open the Excel xlsument
Set wxls = wxlss.Open(sXlsFile)
' Print the Excel xlsument to the Acrobat Distiller -
' will generate a postscript (.ps) (temporary) file
wdo.ActiveXlsument.PrintOut False, , , sTempFile
' This outcommented part was used while trying to use "Acrobat PDFWriter"
'Do While wdo.BackgroundPrintingStatus > 0
' 'Do nothing - just wait for printing to finish before closing Excel
'Loop
wxls.Close WdDoNotSaveChanges
wdo.ActivePrinter = sPrevPrinter
wdo.Quit WdDoNotSaveChanges
Set wdo = Nothing
' Debug output...
'If bShowDebug Then
WScript.Echo " Distilling to '" + sPDFFile + "'"
'End If
' Distill the postscript file to PDF
oDistiller.FileToPDF sTempFile, sPDFFile, "Print"
Set oDistiller = Nothing
' Delete the temporary postscript file...
fso.DeleteFile (sTempFile)
Set fso = Nothing
MsgBox ("done")
End Function
' *** MAIN **************************************
Call EchoLogo
Call EchoUsage
Call CheckArgs
Call XLS2PDF(arguments.Unnamed.Item(0), arguments.Named.Item("o"))
Set arguments = Nothing
MsgBox ("done")
End Function
MsgBox ("done")
End Sub
|
|
|
|
|
Sorry, I've never used PDFDistiller. We can't possibly support the thousands of 3rd party libraries out there because there are so many of them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
so is there anyway you could help me .i have acrobat 6.0 installed on my system and rom excel , i click on the create pdf to do that but i need to write the macro that can do the batch conversion for me .. i got this from a friend and it gives me activex object not found bla bla bla
The following VB example convert "c:\*.xls" to pdf file, not include file of sub-folder, the conversion result is in "d:\":
dim ConvertCom as object
dim sResult as string
set ConvertCom=CreateObject("czxls2pdf.ConvertApplication")
ConvertCom.Visible=true
sResult=ConvertCom.ConvertFolder("c:\*.xls","d:\",false,"")
if sResult="" then
msgbox "Convert OK!"
else
msgbox "Convert Failure, error reason is" & sResult
end if
set ConvertCom=nothing
what do i do?
|
|
|
|
|
Different component - exact same answer as before.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
so how do i get the third component? i need to get this resolved pls advice me on what to do.
|
|
|
|
|
It's called a 3rd PARTY component. It means that someone else besides you or Microsoft wrote it. A 3rd party/person wrote the component.
Google for PDF writer! You'll find dozens of them. One here on CP, a bunch over on SourceForge, ...
But in ALL cases, YOU have to learn how to use the component.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
if i download the pdf writer like i ve just done do i need a subroutine to call a function that will create the acrobat ?
|
|
|
|
|
Yes! This stuff doesn't happen automagically! As for exactly how to use the components, you're better off talking the manufacturer of the component!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am working on VB.NET Windows form application. I am using Data Binding feature of .NET. I have one problem as described below:
There are two table call “Overheads” and “OverheadDistribution”.
OverheadID is Primary Key for Overheads and FK for Overheads.
There is a Master-Detail Win Form where OverheadDistribution is shown in Datagrid as part of Detail part for selected Master (Overhead).
When I fetch data from Data source in DataSet. I make a DataRelation using OverheadId and assign this DataRelation to Datagrid as DataSource.
There are ten numbers of records in OverheadDistribution and for OverheadID=1, there are two records (OverheadDistributionID = 3,5). So, there are two rows in Datagrid.
When I want to delete a row from Datagrid, I select a row in Datagrid, get Row index using CurrentRowIndex, let assume I select row no 2 means actually fifth row in datatable (“OverheadDistribution”).
So, How can I find corresponding row of Datagrid in Datatable? Means, by clicking on Datagrid row, how can I find respective row in DataTable?
Regards,
|
|
|
|
|
I am using DirectShow in vb.net.
Now here is a picturebox in a winform, in which I want the video class play.
How to set the size of the video?
Thanks!
|
|
|
|
|
Set the size of the picture box.
There may be a mode that causes the video to play full screen, but it's my recollection that happens by itself.
Managed DirectShow is really crap - make sure you read my article on the subject so you know it's limitations.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you.
However, when play again after the video stopped, the video size do not same as before
|
|
|
|
|
If you read my article, as I suggested, you'd know that's one of the ways that managed DirectShow fights you, and you need to create your own control which does not allow itself to be sized without your permission.
managed Direct Show is crap. I ended up using Windows Media Player instead.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
<< managed Direct Show is crap >>
-- Is this the title of your article?
|
|
|
|
|
ROTFL - no, search for articles by Graus and you'll find it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need to create a report that will pull up information from a database as a flat file. I have created the form but as this is my first project not sure where to go from here to create the flat file and to create a test file for a test upload. Please help.
|
|
|
|
|
When you say "Flat file" are you meaning a simple text file? If so try something like this.
Dim sw as System.IO.StreamWriter = new System.IO.StreamWriter("C:\test.txt")
sw.Writeline("Line 1")
sw.Writeline("Line 2")
sw.Flush
sw.Close
|
|
|
|
|
how can i see how many hours there are from a time till another time. example: from 11pm yesterday till 11am Now there is 12 hrs! how can i make this happen??
Adrian De Battista
|
|
|
|