Click here to get back home

Reading AND writing Excel spreadsheets

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Reading AND writing Excel spreadsheets Colin Walls 04-30-2005
Posted by Colin Walls on April 30, 2005, 10:05 am
Please log in for more thread options


I am happy creating spreadsheets with Spreadsheet::WriteExcel and reading
them using Spreadsheet::ParseExcel.

However, I have been asked to write data to an already existing spreadsheet.
Is this possible using a mixture of these two modules? If so, how does one
do it?

--
Colin Walls
Removed the pink meat to mail me


Posted by Jason Gurtz on May 4, 2005, 1:59 pm
Please log in for more thread options


On 4/30/2005 04:05, Colin Walls wrote:
> I am happy creating spreadsheets with Spreadsheet::WriteExcel and reading
> them using Spreadsheet::ParseExcel.
>
> However, I have been asked to write data to an already existing spreadsheet.
> Is this possible using a mixture of these two modules? If so, how does one
> do it?

AFAIK, it can't be done. Spreadsheet::WriteExcel can only do new
documents. I suppose you could kludge together something by reading in
values with the parsing module and then iterating over your data structure
for mods and then iterating again to write a new sheet and then do file
swapping/renaming. If you do that you're more adventurous then I :)

~Jason

--

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Posted by Rick Kochanski on May 6, 2005, 12:25 am
Please log in for more thread options


wrote:

>On 4/30/2005 04:05, Colin Walls wrote:
>> I am happy creating spreadsheets with Spreadsheet::WriteExcel and reading
>> them using Spreadsheet::ParseExcel.
>>
>> However, I have been asked to write data to an already existing spreadsheet.
>> Is this possible using a mixture of these two modules? If so, how does one
>> do it?
>
>AFAIK, it can't be done. Spreadsheet::WriteExcel can only do new
>documents. I suppose you could kludge together something by reading in
>values with the parsing module and then iterating over your data structure
>for mods and then iterating again to write a new sheet and then do file
>swapping/renaming. If you do that you're more adventurous then I :)
>
>~Jason

I have used Win32::OLE to write to an existing Excel spreadsheet. NO
FUN; but, can be done.

        use Win32::OLE qw(in with);
        use Win32::OLE::Const 'Microsoft Excel';

Best of luck.


Posted by Colin Walls on May 7, 2005, 5:08 pm
Please log in for more thread options


Rick Kochanski wrote:

> wrote:

> I have used Win32::OLE to write to an existing Excel spreadsheet. NO
> FUN; but, can be done.
>
> use Win32::OLE qw(in with);
> use Win32::OLE::Const 'Microsoft Excel';

I should have said that this is on a UNIX system.

I think I am just going to have to write a new spreadsheet and let them cut
and paste into the spreadsheet that they want. There are just too many
worksheets and formulae to try and recreate th target spreadsheet.

--
Colin Walls
Removed the pink meat to mail me


Similar ThreadsPosted
How to write into existing Excel Spreadsheets? July 13, 2004, 1:24 pm
Writing row at a time in Excel using OLE June 14, 2007, 1:43 pm
Reading contents of an excel file from a test file May 15, 2007, 2:49 am
Google Spreadsheets November 7, 2006, 8:31 am
Parsing OpenOffice Spreadsheets April 25, 2005, 7:23 pm
Help:Generating multiple spreadsheets in MSExcel worksheet using perl?? October 17, 2006, 11:37 am
writing modules in 'c' August 27, 2005, 3:18 pm
Writing VB macro script in xls May 20, 2008, 7:46 am
flush writing to multiple children IO::Pipe April 29, 2005, 12:36 pm
Help reading PDF to get text... November 26, 2004, 3:50 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap