Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > problems writing existing worksheet

Reply
Thread Tools

problems writing existing worksheet

 
 
C.Nieboer@gmail.com
Guest
Posts: n/a
 
      06-03-2005
Hello,

I'm verry new with Perl....blahblah

I have a perl script who read out a txt file and extract some
information from it. The output of it is placed in a new Excel file
create with:

my $workbook = Spreadsheet::WriteExcel->new($file);
my $worksheet = $workbook->addworksheet();
my $format = $workbook->add_format();

But what i want is that the output comes in an existing workbook and
overwrite a specific (existing) worksheet.

The perl script is called from a VBA macro so the xls file where to
write the output is allready open.

I've looked on several sites and tried several things, but i cant get
it work. I have tried OLE Spreadsheet:SimpleExcel&WriteExcel.

Can someone tell me which module i have to use... and maybe good
tutorial url for this problem.

Allready Thanks CN

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      06-03-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:1117793625.036970.137720
@g43g2000cwa.googlegroups.com:

> I'm verry new with Perl....blahblah


As you have noticed, pointing out your experience level is completely
unnecessary, so please don't do it.

Please read the posting guidelines for this group to learn how to help
yourself and help others help you.

> I have a perl script who read out a txt file and extract some
> information from it. The output of it is placed in a new Excel file
> create with:
>
> my $workbook = Spreadsheet::WriteExcel->new($file);
> my $worksheet = $workbook->addworksheet();
> my $format = $workbook->add_format();
>
> But what i want is that the output comes in an existing workbook and
> overwrite a specific (existing) worksheet.
>
> The perl script is called from a VBA macro so the xls file where to
> write the output is allready open.


Given that you are already using VBA etc, you should probably be looking
into using Win32::OLE and manipulating the worksheet through Excel's OLE
interface.

I do not think you can write to a file that is open for full access by
Excel.

Sinan

--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
 
 
 
C.Nieboer@gmail.com
Guest
Posts: n/a
 
      06-07-2005
Sinan,

Thanks for your reply.
I've tried the past weekend several things, because i hoped there was a
way to write to an open excel file. But i think i have to look for a
cut and paste option, or something like that.

Thanks for your help CN

A. Sinan Unur schreef:
> (E-Mail Removed) wrote in news:1117793625.036970.137720
> @g43g2000cwa.googlegroups.com:
>
> > I'm verry new with Perl....blahblah

>
> As you have noticed, pointing out your experience level is completely
> unnecessary, so please don't do it.
>
> Please read the posting guidelines for this group to learn how to help
> yourself and help others help you.
>
> > I have a perl script who read out a txt file and extract some
> > information from it. The output of it is placed in a new Excel file
> > create with:
> >
> > my $workbook = Spreadsheet::WriteExcel->new($file);
> > my $worksheet = $workbook->addworksheet();
> > my $format = $workbook->add_format();
> >
> > But what i want is that the output comes in an existing workbook and
> > overwrite a specific (existing) worksheet.
> >
> > The perl script is called from a VBA macro so the xls file where to
> > write the output is allready open.

>
> Given that you are already using VBA etc, you should probably be looking
> into using Win32::OLE and manipulating the worksheet through Excel's OLE
> interface.
>
> I do not think you can write to a file that is open for full access by
> Excel.
>
> Sinan
>
> --
> A. Sinan Unur <(E-Mail Removed)>
> (reverse each component and remove .invalid for email address)
>
> comp.lang.perl.misc guidelines on the WWW:
> http://mail.augustmail.com/~tadmc/cl...uidelines.html


 
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
Existing Dll - using Functions from an existing dll Tristin.Colby@gmail.com Ruby 0 02-05-2008 07:38 PM
How to make COPY of Worksheet(1) to some other Worksheet ??? Katja Perl Misc 1 01-14-2008 10:26 AM
Why no existing Java type to existing XML schema binding support? nrm Java 3 04-10-2006 04:52 PM
Unable to read particular worksheet from excel file using perl harshan Perl 0 07-20-2004 09:32 PM
How to delete an Excel worksheet by using ASP.NET? =?Utf-8?B?U2hhbyBZb25n?= ASP .Net 5 05-12-2004 08:11 AM



Advertisments