Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Problems opening an Excel file...

by olivierp (Hermit)
on Feb 10, 2005 at 11:33 UTC ( #429662=note: print w/ replies, xml ) Need Help??


in reply to Re: Problems opening an Excel file...
in thread Problems opening an Excel file...

To complement lmcmanamra's point, 2 other things that can cause this are "/" in the path instead of "\", and opening twice the same file name.

HTH
--
Olivier


Comment on Re^2: Problems opening an Excel file...
Re^3: Problems opening an Excel file...
by mrdowns (Initiate) on Feb 10, 2005 at 15:50 UTC
    Thanks for your comments. Unfortunately, after some double-checking, none of these seem to be the problem. Here's what the command line looks like:
    c:\perl\bin\perl.exe c:\perl\excel\TestRead.pl "c:\test.xls"
    When I run this from the command line, it works perfectly. When I call it from SQL Server, it fails with the above error.
    I'm especially weirded out by the fact that I'm not getting an error description. That or the description is a series of 4 spaces, which is the crappiest description ever. I blame Microsoft.
      c:\perl\excel\TestRead.pl "c:\test.xls"
      Wild guess. Could \t be perchance translated to a tab, leading your script to open c:\   est.xls
      Try  my $file = "c:\test.xls" in your snippet, and you should get something like this:
      P:\>c:\temp\openxl.pl "c:\temp\test.xls" OLE exception from "Microsoft Office Excel": 'c: emp est.xls' could not be found. Check the spelling of the + file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently use +d files on the File menu, make sure that the file has not been renamed, +moved, or deleted. Win32::OLE(0.1702) error 0x800a03ec in METHOD/PROPERTYGET "Open" at c:\temp\openxl.pl line 10
      HTH
      --
      Olivier

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://429662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2014-09-30 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (378 votes), past polls