john.tm has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Spreadsheet::BasicRead; use Excel::Writer::XLSX; use Spreadsheet::ParseExcel; my $xlsx = ("c:\\acb.xlsx"),,1; my $csv = ("c:\\acb.csv"),,1; if (-e $xlsx) { my $ss2 = new Spreadsheet::BasicRead($xlsx) or die; my $name2 = ''; my $row2 = 0; open(FILE2, ">$csv") or die ; binmode(FILE2, ":utf8"); # Wide character in print warnings while (my $data2 = $ss2->getNextRow()){ $row2++; $name2 = join(',', @$data2); print FILE2 $name2."\n" if ($name2 ne ""); } close FILE2; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl to convert a named workseet from an xlsx workbook with multiple worksheets into a csv file
by Tux (Canon) on Nov 22, 2014 at 09:36 UTC | |
Re: Perl to convert a named workseet from an xlsx workbook with multiple worksheets into a csv file
by Loops (Curate) on Nov 22, 2014 at 02:12 UTC | |
Re: Perl to convert a named workseet from an xlsx workbook with multiple worksheets into a csv file
by ww (Archbishop) on Nov 22, 2014 at 02:33 UTC | |
by john.tm (Scribe) on Nov 22, 2014 at 02:45 UTC | |
by ww (Archbishop) on Nov 22, 2014 at 13:10 UTC |