Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

(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.)
All to this point has been to no avail. (I cannot recall if there was anything else I tried. In my attempts at trying to solve the problem myself, I did notice that File::Temp is used to create the temporary directory, and in trying to track if that might be the cause saw a number of comments regarding permissions on temporary files and directories. I am not sure at the moment if that bit of information adds to or detracts from the question, however.)

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.


In reply to Question regarding error when trying to generate spreadsheet with Excel::Writer::XLSX by atcroft

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-20 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found