Solved

How to automatically add columns to an existing excel file?

Posted on 2009-03-31
5
524 Views
Last Modified: 2012-06-27
In my excel table, the rows are features or parameters of devices, for example, device type, physical address, IP address, ....... The columns are different devices. one columns is for one device.

I need to extract these device information from configuration files using a Perl script and write in one existing excel table.  when using
while()  {
# write in data
}

from row 1, row 2, ...is easy.  using +1
but how to go from  column A,  column B,  column C,...?

If anybody wanna help me out, it would be greatly appreciated!
0
Comment
Question by:howruaz9
  • 3
5 Comments
 
LVL 2

Assisted Solution

by:jbmraja
jbmraja earned 200 total points
ID: 24036646
0
 

Author Comment

by:howruaz9
ID: 24115923
Thanks very much jbmraja

I try to use Spreadsheet::WriteExce, but it failed as below.

Can't locate Spreadsheet/WriteExcel.pm in @INC (@INC contains: C:/Perl/site/lib
C:/Perl/lib .) at xls1.txt line 4.
BEGIN failed--compilation aborted at xls1.txt line 4.



The line 4:  use Spreadsheet::WriteExcel;



0
 
LVL 39

Accepted Solution

by:
Adam314 earned 300 total points
ID: 24133539
You need to install that module.  If you are using the ActiveState distro, you can do so by running this:
    ppm install Spreadsheet::WriteExcel

If you are using a diff distro... which one are you using?
0
 

Author Comment

by:howruaz9
ID: 24134139
I'm using ActivePerl-5.10.0.1004-MSWin32-x86-287188

ppm install Spreadsheet::WriteExcel
ppm install Spreadsheet::ParseExcel

Both work very well.  Thanks so much Adam314!


0
 

Author Closing Comment

by:howruaz9
ID: 31565142
Adam314 and Jbmraja, I really appreciate your time, patience and kind help!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question