merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
3. Fill in the data I need 4. Try and save the edited copy of the spreadsheet with$excel = Win32::OLE->new('Excel.Application', 'Quit'); $workbook = $excel->Workbooks->Open<copied file name>) $worksheet = $excel->ActiveWorkbook->Worksheets(“sheet1”);
The MSDOS screen gives the following contents for $ew_message <Could not save spreadsheet <copied file name> is just after saving part file system error text <message <> number <317>> I also get an Excel message saying Do want to save the changes you made to <copied file name> with three buttons for Save, Don’t Save and Cancel. If I open the copied spreadsheet (before I use any of the message buttons) I get the message that the file is Locked for Editing. If I use the Save button I get the edited spreadsheet that I want. What changes do I have to make so that the spreadsheet will be saved as I would like it to?$excel->Workbooks(1)->SaveAs(<copied file name>) or ($excel_res = 0, + $ew_message = "Could not save spreadsheet <copied file name>); $en_num = Win32::GetLastError(); $en_err = "message <" . Win32::FormatMessage($en_num) . "> number <" . + $en_num . ">"; $ew_message = "<" . $ew_message . "> is just after saving part file\n" + . "system error text <$en_err>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel SaveAS problem
by poj (Abbot) on Mar 21, 2017 at 15:39 UTC | |
by merrymonk (Hermit) on Mar 21, 2017 at 17:28 UTC |