Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: Getting an exception while reading excel file using Win::OLE from a current directory

by Corion (Patriarch)
on Feb 28, 2017 at 10:10 UTC ( [id://1183116]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Getting an exception while reading excel file using Win::OLE from a current directory
in thread Getting an exception while reading excel file using Win::OLE from a current directory

Did you print out the directory name you are trying to save to?

my $outdir = 'updated_'.$dir; my $outfile = $outdir."\\".$excelfile; print "Trying to save to directory [$outdir]\n"; print "Trying to save to file [$outfile]\n"; $Book->SaveAs($outfile);

The directory name you construct makes no sense. Print it out, look at it, and then construct it in a sensible way.

  • Comment on Re^5: Getting an exception while reading excel file using Win::OLE from a current directory
  • Download Code

Replies are listed 'Best First'.
Re^6: Getting an exception while reading excel file using Win::OLE from a current directory
by rockyurock (Acolyte) on Feb 28, 2017 at 10:15 UTC
      It;s asking me to overwrite the existing excel file rather creating a new excel file as mentioned in the script .. updated_Excelfile.

        Seriously, please read your debugging output.

        On Windows, updated E:\ is not a valid directoryname or filename.

        All other errors are simply consequents of that initial error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found