W
Woland99
Howdy,
I need to save content of just one workshhet in Excel to tab-delimited
file.
I tried sth like:
$sheet = $wbook->{Worksheets}->{"$sheet_name"};
if($sheet->Activate()){;}
else
{
print STDERR "Could not access Sheet $sheet_name in the file
$fullname_input_file: $!\n";
exit;
}
my $file_type = -4158; #Constant equivalent for tab delimited file
$wbook->{ActiveSheet}->SaveAs({ FileName => $fullname_output_file,
FileFormat => $file_type })
|| print STDERR "didnt save the sheet $sheet_name of file
$fullname_output_file: $!\n";
$wbook->Close({ FileName => $fullname_output_file});
but SaveAs always fails complaining that $fullname_output_file does not
exists.
Is there sth I am missing?
If I do just:
$wbook->SaveAs({ FileName => $fullname_output_file, FileFormat =>
$file_type })
all works ok except that it save FIRST worksheet in workbook.
I need to save content of just one workshhet in Excel to tab-delimited
file.
I tried sth like:
$sheet = $wbook->{Worksheets}->{"$sheet_name"};
if($sheet->Activate()){;}
else
{
print STDERR "Could not access Sheet $sheet_name in the file
$fullname_input_file: $!\n";
exit;
}
my $file_type = -4158; #Constant equivalent for tab delimited file
$wbook->{ActiveSheet}->SaveAs({ FileName => $fullname_output_file,
FileFormat => $file_type })
|| print STDERR "didnt save the sheet $sheet_name of file
$fullname_output_file: $!\n";
$wbook->Close({ FileName => $fullname_output_file});
but SaveAs always fails complaining that $fullname_output_file does not
exists.
Is there sth I am missing?
If I do just:
$wbook->SaveAs({ FileName => $fullname_output_file, FileFormat =>
$file_type })
all works ok except that it save FIRST worksheet in workbook.