in reply to Re^4: Create CSV file from xlsx file
in thread Create CSV file from xlsx file
This is confusing, are:
use Spreadsheet::Read; use Text::CSV_XS;
and
xlscat -S 1 -C 9-11,21 -c sample.xlsx >file1.csv
Different scripts? Why do you have use Text::CSV_XS;? Regardless you need to stop trying things at random in the hope they'll work. It's a poor strategy.
In order to perform the task you need to you do not need to write a script. Do the following steps, in order, don't do anything else:
1. Install Spreadsheet::Read, from the command prompt:
cpan Spreadsheet::Read
It will ask if you want to install xlscat as well as other utilities:
marto@shemp:~$ cpan Spreadsheet::Read Reading '/home/marto/.cpan/Metadata' Database was generated on Thu, 24 Oct 2013 07:53:02 GMT Running install for module 'Spreadsheet::Read' Running make for H/HM/HMBRAND/Spreadsheet-Read-0.49.tgz Checksum for /home/marto/.cpan/sources/authors/id/H/HM/HMBRAND/Spreads +heet-Read-0.49.tgz ok CPAN.pm: Building H/HM/HMBRAND/Spreadsheet-Read-0.49.tgz Do you want to install 'xlscat' (Convert Spreadsheet to plain text or +CSV) ? [y] y Do you want to install 'ss2tk' (Show a Spreadsheet in Perl/Tk) ? [y] +y Do you want to install 'xls2csv' (Wrapper around xlscat for easy XLS = +> CSV) ? [y] y Checking if your kit is complete... Looks good
cpan should install any prerequisites required.
2. run the commands Tux gave you here.
If you're actually interested in learning how these things work I suggest you spend time reading and understanding the following:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Create CSV file from xlsx file
by Tux (Canon) on Oct 24, 2013 at 14:34 UTC | |
by viji234 (Initiate) on Oct 25, 2013 at 06:00 UTC | |
by marto (Cardinal) on Oct 25, 2013 at 06:42 UTC | |
by Anonymous Monk on Oct 25, 2013 at 07:15 UTC | |
by marto (Cardinal) on Oct 25, 2013 at 07:55 UTC | |
|