Solved

How to automatically add columns to an existing excel file?

Posted on 2009-03-31
5
520 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Input from stdin for perl 6 118
rename outfile before writing 2 71
instmodsh - listing perl modules 2 74
Control Number of Log Files -Perl 7 55
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 …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now