Differences between version 7 and previous revision of Excel2CSV.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 7 | Last edited on Thursday, May 13, 2004 4:32:24 pm | by AristotlePagaltzis | Revert |
Older page: | version 4 | Last edited on Tuesday, May 11, 2004 10:33:38 pm | by AristotlePagaltzis | Revert |
@@ -1,12 +1,10 @@
-[Perl] script to convert [Microsoft] Excel Spreadsheets to
[CSV] (Command Seperated Values)
+This
[Perl] script converts all the worksheets in a MicrosoftExcel SpreadSheet
to individual
[CSV] files.
-Requires the
following [Perl] Modules
:
+The
following modules are required
:
-#
Spreadsheet::~
ParseExcel
-#
Getopt::Long
-
-See also: [
http://search.cpan.org/dist/Spreadsheet
-ParseExcel-Simple
/]
+* [
Spreadsheet::ParseExcel | http://search.cpan.org/dist/Spreadsheet-ParseExcel-Simple/]
+* [
Getopt::Long |
http://search.cpan.org/dist/Getopt
-Long
/] (already included with any standard [Perl] installation)
----
<verbatim>
@@ -120,10 +118,14 @@
my @row = $worksheet->{MinRow} .. $worksheet->{MaxRow};
my @col = $worksheet->{MinCol} .. $worksheet->{MaxCol};
for my $row ( @{ $worksheet->{Cells} }[ @row ] ) {
- print
$fh join $opt
_separator, map
$_->Value(),
@$row[ @col ];
- print $fh "\n";
+ my @cellvalue = map {
+
$_ =
$_->Value() if ref $_;
+ $_ = '' if not defined $_;
+ $_;
+ }
@$row[ @col ];
+ print $fh join($opt_separator, @cellvalue),
"\n";
}
}
}
</verbatim>