Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Excel2Text

by mikeB (Friar)
on Dec 19, 2006 at 15:59 UTC ( #590690=note: print w/replies, xml ) Need Help??


in reply to Excel2Text

In my experience, no matter what you choose for a delimiter, that character will eventually show up in the input, leading to problems parsing the generated output. You might want to escape any delimiter characters before writing the output. Alternatively, if you can get along with CSV files instead of '|' delimited files, check out Class::CSV.

Replies are listed 'Best First'.
Re^2: Excel2Text
by stonecolddevin (Parson) on Dec 19, 2006 at 21:35 UTC

    I'm not exactly certain what you mean by this reply. The "|" character is split on and only the values in between the "|" characters are used. Maybe I'm not understanding your reply, but this script's goal is to take all the fields from an Excel file and write them to a text file, separating each field by the "|" character and each row by a newline ("\n"). UPDATE: Misunderstood mikeB's comment. Yes, things can get ugly if there's a "|" in the Excel sheet like GrandFather said. However, it's just one of many options, delimit it with what you like, or you can use Class::CSV.

    meh.

      If a cell contains text with a | in it then things go a little pear shaped ;).


      DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2022-01-17 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (50 votes). Check out past polls.

    Notices?