projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3061a22
)
Better output-file renaming
author
Ben Ostrowsky
<ben@esilibrary.com>
Sun, 19 Sep 2010 01:11:42 +0000 (
01:11
+0000)
committer
Galen Charlton
<gmc@esilibrary.com>
Mon, 16 Jul 2012 15:29:34 +0000 (11:29 -0400)
xls2tab
patch
|
blob
|
history
diff --git
a/xls2tab
b/xls2tab
index
8ddc19f
..
3b8dbcd
100755
(executable)
--- a/
xls2tab
+++ b/
xls2tab
@@
-11,6
+11,7
@@
use warnings;
use Spreadsheet::ParseExcel::Simple;
use File::Spec;
+use Data::Dumper;
for (@ARGV) {
for (glob $_) {
@@
-33,7
+34,8
@@
sub dump_books {
next unless $sheet[$_]->has_data();
my $sfn = $file;
$sfn =~ s?\.xls$??i;
- $sfn.= ((@sheet > 1) ? sprintf(".%02i",$_) : "").'.tab';
+ $sfn .= '_' . $sheet[$_]->sheet->get_name() . '.tsv';
+ $sfn =~ s/ /_/g;
open TAB, '>', $sfn or do {
warn "Unable to write to $sfn";
next;