merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
I have a case where the workbook opening fails although the excel object worked.To confuse matters this works on my system but not on another one.I have been told that the spreadsheet was not open in another application such as Excel.Can any one tell me how to find out what I wrong?Are there any error codes available that may help?I am reasonbly certain that the file is there but I will be checking more thoroughly.$excel = Win32::OLE->new('Excel.Application', 'Quit') or ($excel_res = + 0, $ew_message = "Could not create excel bject"); print "[open_spreadsheet] after excel result <$excel_res> mess <$ew_me +ssage>\n"; if($excel_res == 1) { $workbook = $excel->Workbooks->Open($hist_file) or ($workbook_res + = 0, $ew_message = "Could not open excel workbook for <$hist_file>") +; print "[open_spreadsheet] after workbook result <$workbook_res> me +ss <$ew_message> for <$hist_file>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel opening problems
by strat (Canon) on Jun 23, 2007 at 09:13 UTC | |
by merrymonk (Hermit) on Jun 25, 2007 at 09:03 UTC | |
|
Re: Excel opening problems
by thezip (Vicar) on Jun 22, 2007 at 17:03 UTC | |
by Anonymous Monk on Jun 22, 2007 at 18:11 UTC |