Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > no $workbook->Close; in Spreadsheet::WriteExcel but in Win32::OLE?

Reply
Thread Tools

no $workbook->Close; in Spreadsheet::WriteExcel but in Win32::OLE?

 
 
Zhidian Du
Guest
Posts: n/a
 
      12-11-2003
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";
 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      12-11-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Zhidian Du) wrote in
news:(E-Mail Removed) om:

> 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?


I do not have Spreadsheet::WriteExcel installed checking the docsquickly
reveals that there issuch a method indeed.

http://search.cpan.org/~jmcnamara/Sp.../WriteExcel.pm

> #$workbook->SaveAs( $dir . '/perl_ole.xls');


On the other hand there is no mention of this method.

> #$workbook->Close;


Case matters in Perl.

--
A. Sinan Unur
(E-Mail Removed)
Remove dashes for address
Spam bait: (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to call jscript "confirm" box from VB.NET, but NOT from a but =?Utf-8?B?SlQ=?= ASP .Net 0 03-21-2006 12:14 AM
Connect to 802.11b but not 802.11g... but used to be able to...? jbraly@gmail.com Wireless Networking 1 03-13-2006 11:05 PM
conects but wont send info but receves =?Utf-8?B?dGFuaw==?= Wireless Networking 1 01-04-2006 04:07 AM
Get DateTime.Now but exact 16 years ago..but how? ASP .Net 11 12-19-2003 10:23 AM



Advertisments