Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005

    Unanswered: strange xp_cmdshell permissions...

    Hey there,
    I have a procedure that runs a PERL script through xp_cmdshell. The PERL script opens Excel and has Excel open a document so that it can parse through it.
    When I run the PERL script directly from the command line, it works perfectly.
    When I run it from xp_cmdshell I get the following error:
    Win32::OLE(0.1502) error 0x800a03ec      in METHOD/PROPERTYGET "Open" at c:\perl\excel\ line 10
    Now I initially thought that this was a simple permissions problem, but the account that xp_cmdshell uses has full permissions on the directory the file's in and to the Excel application. Wierder still, I can use PERL to read and write files to my heart's content. I just can't use the OLE Excel object to open an Excel file.

    Anyone encounter something like this before? I think the fact that it's PERL is coincidental. The issue is that I can't use the Win32 Excel.Application object to open Excel files when using xp_cmdshell to do so. Remember, this works when I run it from the command line.

    Thanks for any help you can provide

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    This is a LONG stretch, but is there an apostrophe in the file name?


  3. #3
    Join Date
    Feb 2005
    Sorry, no apostrophe. In fact, I've tried this with several files, the most recent of which is simply "test.xls". The is the kind of problem that makes my brain hurt. Has anyone encountered this before?

  4. #4
    Join Date
    Feb 2005
    Hmmm...As much as I admire and enjoy Perl, I think that for Win32 objects it is poorly documented and buggy...whenever I run into this kind of issue, I find it best to resort (grudgingly) to using VBScript. Sorry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts