viji234 has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone please help me on this?use Spreadsheet::WriteExcel; use Spreadsheet::ParseExcel; use Spreadsheet::XLSX; my $excel = Spreadsheet::XLSX -> new ('sample.xlsx',); ##print "$excel \n"; my @sheets = qw(sheet1 sheet2); my $sheet1 = $sheet[0]; my $sheet2 = $sheet[1]; print "$sheet1\n"; print "$sheet2\n"; foreach my $sheet (@{$excel -> {Worksheet}}) { printf("Sheet: %s\n", $sheet->{Name}); $sheet -> {MaxRow} ||= $sheet -> {MinRow}; foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $sheet -> {MaxCol} ||= $sheet -> {MinCol}; foreach my $col ($sheet -> {MinCol} .. $sheet -> {Max +Col}) { my $cell = $sheet -> {Cells} [$row] [$col]; if ($cell) { printf("( %s , %s ) => %s\n", $row, $col, +$cell -> {Val}); } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create CSV file from xlsx file
by Tux (Canon) on Oct 24, 2013 at 11:40 UTC | |
by viji234 (Initiate) on Oct 24, 2013 at 11:53 UTC | |
by marto (Cardinal) on Oct 24, 2013 at 12:00 UTC | |
by viji234 (Initiate) on Oct 24, 2013 at 12:05 UTC | |
by marto (Cardinal) on Oct 24, 2013 at 12:14 UTC | |
by viji234 (Initiate) on Oct 24, 2013 at 12:06 UTC | |
by Tux (Canon) on Oct 24, 2013 at 12:32 UTC | |
by viji234 (Initiate) on Oct 24, 2013 at 13:38 UTC | |
by marto (Cardinal) on Oct 24, 2013 at 13:53 UTC | |
| |
by viji234 (Initiate) on Oct 25, 2013 at 06:54 UTC | |
by marto (Cardinal) on Oct 25, 2013 at 06:56 UTC | |
| |
|
Re: Create CSV file from xlsx file
by kcott (Archbishop) on Oct 24, 2013 at 14:09 UTC | |
by viji234 (Initiate) on Oct 25, 2013 at 06:45 UTC | |
by kcott (Archbishop) on Oct 25, 2013 at 07:41 UTC | |
by viji234 (Initiate) on Oct 28, 2013 at 08:25 UTC | |
by Tux (Canon) on Oct 28, 2013 at 09:17 UTC | |
|