'sci_format|sci-format=s',
'max_digits|max-digits=i',
'rmode|r-mode|r!',
- 'remove_name|remove-name=s@',
+ 'remove_name|remove-name=s@',
+ 'output|output_file|output-file=s',
'debug|d+','help|h|?','man|m');
pod2usage() if $options{help};
my %wb_formats = ();
my $csv = Text::CSV->new({sep_char=>$sep_char});
-my $wb = Spreadsheet::WriteExcel->new(\*STDOUT);
+my $wb;
+if (defined $options{output}) {
+ $wb = Spreadsheet::WriteExcel->new($options{output});
+} else {
+ $wb = Spreadsheet::WriteExcel->new(\*STDOUT);
+}
+
for my $file (@ARGV) {
my $fh;
if (not defined $file) {