in reply to Re^3: Modifying an existing Excel file
in thread Modifying an existing Excel file

I'm not sure exactly what your problem is - starting Excel, opening the file or entering data - and obviously I don't have your "smoke test" file. Amending the code to create a new spreadsheet, this works on my system:
use strict; use Win32::OLE; #$doc = 'Smoke_Test.xls'; #$ex = Win32::OLE->GetObject($doc); my $ex = Win32::OLE->new('Excel.Application'); $ex->{Visible} = 1; $ex->{SheetsInNewWorkbook} = 1; # get a new workbook #$book = $ex->Workbooks->Add; my $book = $ex->Workbooks->Add; # write to a particular cell #$sheet = $book->Worksheets("Sheet1"); my $sheet = $book->Worksheets("Sheet1"); $sheet->Cells(1,1)->{Value} = "foo"; undef $book; undef $ex; exit(0);
It works just as well without the "undef" commands.

Regards,

John Davies