atcroft has asked for the wisdom of the Perl Monks concerning the following question:
(Apologies, but since I am not on my work system at the moment, the following is based on memory.)
Last week I was working on several scripts for $job[0] that generate and email data in spreadsheets. Previously I have used (very successfully) Spreadsheet::WriteExcel to generate XLS documents, but for various reasons was asked to change to generating XLSX documents. Following the suggestion of the documentation, I modified the script on Thursday to instead use the Excel::Writer::XLSX module. (The extent of the changes were to change the use statement, change the extension on the generated filename, and the new() call.) Friday morning, two of the scripts failed to generate their expected output, instead complaining about "Couldn't create subdirectory xl/worksheets".
I spent the better part of Friday trying such things as:
- changing croak() to confess() to try to get more information,
- attempting to set permissions (via chmod) on the directory (and/or its parents) in the Excel::Writer::XLSX::Package::Packager::_mkdir routine,
- specifying a temp directory using the set_tempdir() method (specified directory was set as 01777 permissions),
- adding in File::Path and using the mkpath function to build the required directories,
- installing a newer version of Excel::Writer::XLSX (System is running on a RH6.x-based system, meaning perl 5.10.x, and Excel::Writer::XLSX v. 0.84.)
Anyone run into this before, and more importantly, can offer a possible way out?
Thank you in advance for your time, attention, and any assistance you may be able to provide.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Question regarding error when trying to generate spreadsheet with Excel::Writer::XLSX
by bliako (Monsignor) on Jul 01, 2018 at 23:39 UTC |