Much to my dismay, I have to process Excel spreadsheets from our (low-tech) vendors. I have a script that opens the file, parses it, checks the data, then writes out an XML file. I have one vendor who somehow generates an Excel 4.0 document (which ParseExcel can't handle). I was about to suggest that she get Openoffice, but then I found the issue I'm wondering about:

If I save a file in Openoffice Calc (saving as Excel, version doesn't matter), ParseExcel sees the formatting instead of the values for numeric fields. Specifically, if I open a new Calc worksheet, then enter '1', 'abc', '4' in rows A -- C, ParseExcel will show 'GENERAL', 'abc', 'GENERAL'. If I then change the formatting of column A to text, I'll see '1'. Excel apparently knows what OO means, though, as if I then open the same file with Excel, it looks and acts normally. Saving the file with Excel eliminates the problem. Is this an OO bug? Is this just something ParseExcel can't handle? (It also doesn't handle dates well, changing 12/31/2004 into 38352.)

I would appreciate any advice on this.

Of all the causes that conspire to blind
Man's erring judgment, and misguide the mind,
What the weak head with strongest bias rules,
Is pride, the never-failing vice of fools.
-- Pope.

In reply to Spreadsheet::ParseExcel incompatible with Openoffice? by pepik_knize

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.