User since: |
Jan 28, 2008 at 08:34 UTC
(16 years ago) |
Last here: |
Jun 06, 2008 at 08:28 UTC
(16 years ago) |
Experience: |
74
|
Level: | Acolyte (3) |
Writeups: |
20
|
Location: | n/a |
User's localtime: |
Mar 28, 2024 at 11:24 UTC
|
Scratchpad: |
View
|
For this user: | Search nodes |
Watch for posts by this user |
|
use Win32::OLE::Const;
use Win32::OLE::Const 'Microsoft Excel';
my $Excel = Win32::OLE->new("Excel.Application" , sub { $_[0]->Quit }
+)
or die Win32::OLE::LastError;
$Excel->{Visible} = 1;
my $Book = $Excel->Workbooks->Open("C:\\Documents and Settings\\clong\
+\Desktop\\Convert to Text file\\Quarantined_IMSIHLR2_20070611_Complet
+ed1.xls")
my $Sheet = $Book->Worksheets(Quarantined_IMSIHLR2_20070611_Completed1
+);
$Excel->{DisplayAlerts} = 0; # avoid being prompted
$Sheet->SaveAs( { FileName => "C:\\Documents and Settings\\clong\\Desk
+top\\Convert to Text file\\test.txt" , FileFormat => xlText }
+)
or die Win32::OLE::LastError;
$Book->Close();
$Excel->Quit;
|