Z
Zhidian Du
When I write a program that need the xls file immediately after
finishing writing the xls file. Why there is no $workbook->Close; to
close the current file? If I use this single program, it's ok. But
how can I let the .xls file to be used by the following programs?
I found in Win32::OLE, it has the counterpart.
Thanks.
Z. Du
#! /usr/bin/perl
use Spreadsheet::WriteExcel;
use Spreadsheet::WriteExcel::Big;
my $workbook = Spreadsheet::WriteExcel->new( "myfirstExcel.xls" );
my $worksheet = $workbook->addworksheet();
my $workformat = $workbook->addformat();
$workformat->set_bold(1);
$row = 0;
$coloumn = 0;
$workformat->set_bold( 1 );
#$workformat->set_column('A:A', 125);
#worksheet->Columns("A:A")->{ColumnWidth} = 25;
$worksheet->set_column( 'A:A', 125);
$worksheet->set_column( 'B', 125);
#$worksheet->write( 0, 0, "Results", $workformat );
$worksheet->write( 0, 0, "Results");
$worksheet->write( 0, 1, "Long resutl is how to seccuess" );
$workformat->set_bold();
$workformat->set_bottom(6);
$worksheet->set_column(0, 0, 12 );
$worksheet->set_column(11, 11, 12);
my $dir = "/u/dian/test";
#$workbook->SaveAs( $dir . '/perl_ole.xls');
#--------------Here it is-----------
#$workbook->Close;
print "test\n";
finishing writing the xls file. Why there is no $workbook->Close; to
close the current file? If I use this single program, it's ok. But
how can I let the .xls file to be used by the following programs?
I found in Win32::OLE, it has the counterpart.
Thanks.
Z. Du
#! /usr/bin/perl
use Spreadsheet::WriteExcel;
use Spreadsheet::WriteExcel::Big;
my $workbook = Spreadsheet::WriteExcel->new( "myfirstExcel.xls" );
my $worksheet = $workbook->addworksheet();
my $workformat = $workbook->addformat();
$workformat->set_bold(1);
$row = 0;
$coloumn = 0;
$workformat->set_bold( 1 );
#$workformat->set_column('A:A', 125);
#worksheet->Columns("A:A")->{ColumnWidth} = 25;
$worksheet->set_column( 'A:A', 125);
$worksheet->set_column( 'B', 125);
#$worksheet->write( 0, 0, "Results", $workformat );
$worksheet->write( 0, 0, "Results");
$worksheet->write( 0, 1, "Long resutl is how to seccuess" );
$workformat->set_bold();
$workformat->set_bottom(6);
$worksheet->set_column(0, 0, 12 );
$worksheet->set_column(11, 11, 12);
my $dir = "/u/dian/test";
#$workbook->SaveAs( $dir . '/perl_ole.xls');
#--------------Here it is-----------
#$workbook->Close;
print "test\n";