Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: a stubborn excel file

by imrags (Monk)
on Jun 24, 2009 at 11:02 UTC ( #774345=note: print w/ replies, xml ) Need Help??


in reply to a stubborn excel file

If you are on Win32 box, i'd suggest use of "Win32::OLE"
To get you started, here's a small piece of code:

use Win32::OLE; $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OL +E->new('Excel.Application'); $Excel->{'Visible'} = 1; #to make it visible #my $Book = $Excel->Workbooks->Open('E:/perl scripts/abc.xls') || die +"could not open excel file"; # open Excel file $Excel->{SheetsInNewWorkBook} = 1; $workbook = $Excel->Workbooks->Add(); $Sheet = $workbook->Worksheets(1); $Sheet->{Name} = "New WorkSheet"; $Sheet->Range("A1")->{Value}="My cell number 1"; $workbook->SaveAs({Filename =>'abc.xls', FileFormat => xlWorkbookNorm +al});
Raghu


Comment on Re: a stubborn excel file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://774345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-11-27 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (187 votes), past polls