locked_user satishkambam has asked for the wisdom of the Perl Monks concerning the following question:
I have a data , and i want to insert that data in to the xlsheet ( in last column )using WIN32::OLE , can you please help me on this
#!/usr/bin/perl use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors. +.. # get already active Excel application or open new my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # open Excel file my $Book = $Excel->Workbooks->Open("C:/Perlscripts/kumar.xlsx"); #fil +e name my $Sheet = $Book->Worksheets(1); my $col; #my $LastCol = $Sheet->UsedRange->Find({What=>"*", # SearchDirection=>xlPrevious, # SearchOrder=>xlByColumns})->{Column}; #print "\n Lastcolumn = $LastCol"; $Book->SaveAs('kumar.xlsx'); # clean up after ourselves $Book->Close;
Iam stuck here can some one help me please
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to Add data in to xlsheet using WIN32::OLE
by Ratazong (Monsignor) on Nov 18, 2011 at 15:09 UTC | |
|