Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Re: Re: csv output

by tjh (Curate)
on Mar 15, 2002 at 13:33 UTC ( [id://151975]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: csv output
in thread csv output

My experience is that MS products can't produce a useful CSV file even when you try to export manually from a document created in the product itself (Excel springs to mind).

So, I'd skip the OLE\Excel steps and go straight for one of the pure Perl solutions mentioned. They are much easier, more controllable, and have a support community...

Also, it might be helpful for us to see an example record of the type of data you're trying to CSV.

Replies are listed 'Best First'.
Re (tilly) 6: csv output
by tilly (Archbishop) on Mar 15, 2002 at 17:38 UTC
    Could you clarify what you mean by can't produce a useful CSV file?

    My understanding and experience is that Excel generally does a reliable CSV export. Here are the limitations and issues that I know about. It cannot successfully export structure that requires metadata which does not fit in CSV format. (Hardly Excel's fault.) Many people do not know how to parse CSV (split does not cut it, and the interface to Text::CSV makes it impossible to produce a reliable solution). (Again not Excel's fault.) And several years ago they had a bug where positive floating point numbers expressed in scientific notation were not recognizable as being numbers by most other spreadsheets (or Access IIRC). That was their fault, but has long been fixed. And Excel, like most Microsoft products, uses pre-emptive locking, which I find rather irritating and inconvenient. (Not to mention a source of significant trouble from time to time.)

    Are there any other issues that I should be aware of?

      Ultimately I guess my Excel issues probably concern a more global desire for predictability of CSV format across products, which will probably seem mundane to you. Not that MS is the only player I have run into with these issues in the not-daily experiences I've had with this.

      The Excel '97 on my laptop will export everything separated by a comma, unless there's a comma within the field (cell), whereupon it exports that cell (and only that cell) with double quote delimiters. It also offers me no controls to set preferences for this export type.

      OTOH, my memory of it is that MS's FoxPro products seem to prefer to use double quote delimiters on all fields, Outlook exports with double quotes on all fields, but Outlook Express seems to export with commas only, just as examples. go figure. The other side of this is for me has been that over the years, various products I would use to import a file expected a CSV file to be in one or another structure (double quotes, no quotes, etc.)

      StarOffice products offers chooices on all the characteristics of these exports, which I of course admire and wish other products did the same.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://151975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found