Get best price on Unlocked Moto G Power | ||||||||||||
|
||||||||||||
|
Perl: OLE Automation and Microsoft ExcelPerl for Win32 comes with the OLE.pm module. This module lets you program Perl scripts to communicate with OLE objects, such as Microsoft Excel. This means you can write a Perl script that can add data, get data, and even create charts in a Microsoft Excel file. The following example shows how to open a Microsoft Excel file and read values from cells in a worksheet.
use OLE;
$xlfile ="c:\\filename.xls"; ##### OLE - Excel Connection # Create OLE object - Excel Application Pointer $xl_app = CreateObject OLE 'Excel.Application' || die $!; # Set Application Visibility # 0 = Not Visible # 1 = Visible $xl_app->{'Visible'} = 0; # Open Excel File $workbook = $xl_app->Workbooks->Open($xlfile); # setup active worksheet $worksheet = $workbook->Worksheets(1); # retrieve value from worksheet $cellA1 = $worksheet->Range("A1")->{'Value'}; $cellB1 = $worksheet->Range("B1")->{'Value'}; # Close It Up $xl_app->ActiveWorkbook->Close(0); $xl_app->Quit();
Related Links for Perl OLE Automation:
|
privacy policy || © 1997-2016. astonishinc.com All Rights Reserved. |