Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

You could also just generate a CSV file. That works fine in lots of versions of Excel. :)

There are a lot of problems i used to face when creating CSV/TDF files for Excel. I first encountered this problem dealing with leading zeros and stock numbers that looked like 1E123. Below find a csv file that documents some of them.

="--------------------" ="leading equals fixes these" "something excell may think as a date" ,="2012-12-12" ,"2012-12-12" ,="2/4" ,"2/4" "something excell may think is a number" ,="1e123" ,"1e123" "leading zeros" ,="00001" ,"00001" "leading equals" ,="=x" ,"=x" "there are more that ive forgotten" ="--------------------" ="leading equals busts these" "commas in string" ,"created,2016-06-19-03-02-26" ,="created,2016-06-19-03-02-26" "long strings" ,"|001-----0|010-----0|020-----0|030-----0|040-----0|050-----0|060---- +-0|070-----0|080-----0|090-----0|101-----0|110-----0|120-----0|130--- +--0|140-----0|150-----0|160-----0|170-----0|180-----0|190-----0|201-- +---0|210-----0|220-----0|230-----0|240-----0|250-----0|260-----0|270- +----0|280-----0|290-----0" ,="|001-----0|010-----0|020-----0|030-----0|040-----0|050-----0|060--- +--0|070-----0|080-----0|090-----0|101-----0|110-----0|120-----0|130-- +---0|140-----0|150-----0|160-----0|170-----0|180-----0|190-----0|201- +----0|210-----0|220-----0|230-----0|240-----0|250-----0|260-----0|270 +-----0|280-----0|290-----0" "so everthing is output as =""..."" that does not have a comma or is l +ong" "you can still perform arithmatic on a =""..."" when it is a number"
As you can see i used what i called the "literal function" (="...") to deal with many of them.


In reply to Re^2: old style xls module by huck
in thread old style xls module by expo1967

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, 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, 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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (9)
    As of 2019-10-22 14:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?