Either way, here is an example (taken from a tutorial in progress on my scratchpad) of opening a file.
Now you could just add a blank Workbook by replaceing the ->Open($excelfile) line withuse strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # Die on Errors. ######################################## ## ::Warn = 2; throws the errors, but ## ## expects that the programmer deals ## ######################################## my $excelfile = 'somefile.csv'; ################################################################### ## First, we need an excel object to work with, so if there isn't## ## an open one, we create a new one, and we define how the object## ## is going to exit ## ################################################################### my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $Book = $Excel->Workbooks->Open($excelfile);
and cycle through your data and enter it directly into excel (an exercise I use leave for the reader, though there is a good example of it in the tutorial mentioned above).my $Book = $Excel->Workbooks->Add();
C-.
In reply to Re: Exporting .csv file to EXCEL
by cacharbe
in thread Exporting .csv file to EXCEL
by naive
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |