Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

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

All

I have a program that writes some data into a spreadsheet, which I want to then analyse again to produce some HTML output. The latter part works in testing but putting the whole lot together has raised an interesting problemette. Code replicated below. My debugging is showing that $gOutWorkbook has a value of "undef" upon return from ReadData, and I have no means of knowing why the workbook is not being (re-)opened to be read, when I have populated it with data previously (not shown here)

So: can I find out the reason *why* the workbook is not being opened properly? (ie some error value from somewhere) I have even put a 10 second delay before I attempt the open, to allow the OS to 'settle down' after closing the file, post writing to it but that doesn't help at all All other variables have relevant and correct values associated with them at the crucial point in the software. Previous ReadData calls work in other parts of the software suite, so it is only this section that is letting me down.

# Re-open as a read only # Read in the workbook and all its data $gOutWorkbook = ReadData ($lOutputFileName); $gOutWorksheet = $gOutWorkbook->[$gOutWorkbook->[0]{sheet}{"my +Sheet"}];

In reply to Spreadsheet::read how to get error? by gsd4me

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 studying the Monastery: (2)
As of 2024-04-26 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found