Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Got positive experince with excel modules ?

by hawtin (Prior)
on May 04, 2011 at 08:18 UTC ( #902830=note: print w/ replies, xml ) Need Help??


in reply to Got positive experince with excel modules ?

I would agree with Wind about Spreadsheet::ParseExcel and Spreadsheet::WriteExcel, they are both reliable modules that do a good job of navigating round Excel files, setting cell formats and so on.

However it is more common that I just want to send out a simple table of values, for those I would use a simple CSV format (via Text::CSV or similar). On a Windows machine files with the csv extension are treated as Excel files and have the benefit of working elsewhere as well.


Comment on Re: Got positive experince with excel modules ?
Re^2: Got positive experince with excel modules ?
by Tux (Monsignor) on May 04, 2011 at 10:13 UTC

    If that is your primary goal, have you ever considered Spreadsheet::Read? It is a wrapper over the most common used Spreadsheet read/parse modules, including Spreadsheet::ParseExcel, and comes with a nice utility called xlscat, which can convert any selection from your spreadsheet to CSV using Text::CSV_XS. It also accepts .ods, .sxc, .csv, and .xlsx if the corresponding parsers are installed.

    $ xlscat --help usage: xlscat [-s <sep>] [-L] [-n] [-A] [-u] [ Selection ] file.xls [-c | -m] [-u] [ Selection ] file.xls -i [ -S sheets ] file.xls Generic options: -v[#] Set verbose level (xlscat) -d[#] Set debug level (Spreadsheet::Read) -u Use unformatted values --noclip Do not strip empty sheets and trailing empty rows and columns -e <enc> Set encoding for input and output -b <enc> Set encoding for input -a <enc> Set encoding for output Input CSV: --in-sep=c Set input sep_char for CSV Input XLS: --dtfmt=fmt Specify the default date format to replace 'm-d-yy' the default replacement is 'yyyy-mm-dd' Output Text (default): -s <sep> Use separator <sep>. Default '|', \n allowed -L Line up the columns -n Number lines (prefix with column number) -A Show field attributes in ANSI escapes Output Index only: -i Show sheet names and size only Output CSV: -c Output CSV, separator = ',' -m Output CSV, separator = ';' Output HTML: -H Output HTML Selection: -S <sheets> Only print sheets <sheets>. 'all' is a valid set Default only prints the first sheet -R <rows> Only print rows <rows>. Default is 'all' -C <cols> Only print columns <cols>. Default is 'all' -F <flds> Only fields <flds> e.g. -FA3,B16

    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2014-07-30 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls