http://www.perlmonks.org?node_id=665138


in reply to Excel in Perl

If you're not interested in pretty formatting, just consider a CSV format instead. It's plain text, it can be generated and parsed very simply in Perl. See Text::CSV among other modules. Also, you can see it and edit it in Notepad or Emacs or whatever. Excel reads and writes CSV files just fine.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: Excel in Perl
by roboticus (Chancellor) on Jan 31, 2008 at 09:48 UTC
    One problem with using .CSV files and Excel is long digit strings (such as account numbers). I've not found a way in a .CSV file to get them to appear correctly in a spreadsheet. I'm always forced to add a prefix to turn it into a string, and the sheet shows the annoying prefix.

    So unless I'm missing something, there are a few cases (in addition to pretty formatting) where creating a spreadsheet is preferable to a .CSV file.

    Example:

    1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456 1234567890123456,"1234567890123456","'1234567890123456",'1234567890123 +456
    Someone ... anyone ... please prove me wrong!

    ...roboticus