in reply to Re^2: Spreadsheet::ParseExcel / WriteExcel question ....
in thread Spreadsheet::ParseExcel / WriteExcel question ....
If you just want to modify a few cells on an existing spreadsheet then consider using Win32::OLE
poj#!perl use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # Die on Errors. # config my $dir = 'c:\\temp\\'; my $file = 'test.xls'; my $Excel = Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{DisplayAlerts} = 0; #$Excel->{Visible} = 1; my $wb = $Excel->Workbooks->Open($dir.$file); my $ws = $wb->sheets(1); my $cell = $ws->Cells(1,1); $cell->{Value} = '567'; $cell->Interior->{Color} = rgbLightGreen; $cell->Font->{Color} = rgbDarkGreen; $wb->SaveAs($dir.'copy_'.$file); $wb->Close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Spreadsheet::ParseExcel / WriteExcel question ....
by jhalbrook (Initiate) on Nov 29, 2017 at 20:41 UTC |