RandomWalk has asked for the wisdom of the Perl Monks concerning the following question:

I have a short script that generates a spreadsheet using Spreadsheet::WriteExcel::Simple. The script concludes with "print FH $ss->data;"--just as documented except I've inserted a file handle. Running this script under linux and copying it to a Win98 system, I can open it with Excel. But copying the script to the Win98 system and running it under MSDOS generates a file that Excel cannot open.The error message "file cannot be accessed" comes with suggestions about write permissions that don't seem to apply. Has anyone else used this module on DOS to generate XL files? Thanks. Mark UPDATE: Just in case this should happen to another unsuspecting porter who happens by: T. Brannon wrote a convenience method, Spreadsheet::WriteExcel::Simple::Save, that promises to obviate the problem. (It appeared in CPAN today, compiles and works as hoped under linux) -M
  • Comment on spreadsheet::writeexcel::simple problem

Replies are listed 'Best First'.
Re: spreadsheet::writeexcel::simple problem
by ysth (Canon) on Nov 04, 2003 at 23:24 UTC
    Probably not worth mentioning, but did you binmode the file handle? Have you compared the created-under-linux version with the other?
      Sad to say it was worth mentioning. I read perlport but binmode seemed pertinent only to text file line endings and I was pretty far from remembering that the *file* ending is the issue with DOS binary files. Thank you. Mark