timtrust123
Programmer
I need to be able to turn off the automatic recalculation of a worksheet for updating.
All goes well creating object etc but i'm unable to turn off the updating.
Here is what I have so far.
#Create and Excel object - No problem here
$ex = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;});
#Open a book - No problem here
$book = $ex->Workbooks->Open ('C:\test.xls', {UpdateLinks => 0});
# Open sheet 1 - No problem here
$Sheet = $book->Worksheets(1);
# Set calculation to manual - problem here
$ex->{'Calculation'} = 'xlManual';
# error message
Unable to set the Calculation property of the Application class
Something is wrong with :$ex->{'Calculation'} = 'xlManual';
Can't see what.
Any help would be appreciated
Code extract below.
Cheers
Tim
All goes well creating object etc but i'm unable to turn off the updating.
Here is what I have so far.
#Create and Excel object - No problem here
$ex = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;});
#Open a book - No problem here
$book = $ex->Workbooks->Open ('C:\test.xls', {UpdateLinks => 0});
# Open sheet 1 - No problem here
$Sheet = $book->Worksheets(1);
# Set calculation to manual - problem here
$ex->{'Calculation'} = 'xlManual';
# error message
Unable to set the Calculation property of the Application class
Something is wrong with :$ex->{'Calculation'} = 'xlManual';
Can't see what.
Any help would be appreciated
Code extract below.
Cheers
Tim