2012年5月25日 星期五

Excel to CSV

CSV’s advantages are: (i) popular ascii format for data computing, processing, and plotting; (ii) built-in or plug-in support support from Gnuplot, Perl, Ruby, Python, and Matlab. 

CSV’s disadvantage is poor readable format, and not good for interactive processing.  On the contrary, Excel file format (xls) makes up this disadvantage. 

To take advantage of both CSV and Excel, we can use Excel (xls) as the user interface; and back-end processing uses CSV.  Therefore, we need a tool to convert xls to csv and vice versa.

CPAN provides both csv2xls and xls2csv. 

Go to CPAN and download xls2csv-xx.tar.gz

uncompressed it, and cd to the directory.

Do ‘perl Makefile.PL’,  then ‘make’, then ‘make test’, then ‘make install’

How to solve the dependency problem?  See next article for details.

What’s the advantage of CPAN xls2csv?  compared with other xls2csv (e.g. catdoc)? 

A. Better support for unicode (Chinese);  B. Better support for multiple worksheet

沒有留言:

張貼留言

追蹤者