how to read data from EXCEL

C

Carlo Cazzaniga

I need to read data from EXCEL worksheets in this way:
The script perl asks me to write a number .
I type a Number f.e. 1000 , the script should look for the number 1000
inside a
excel worksheet file and if it find it, should capture all the other
numbers reported in the raw where there is the number 1000.
the mother number (1000) is always in the first colomn of excel sheet.

col1 col2 col3 col4 col5
raw1 900 002 004 006
raw2 1000 345 445 888 777

once the script had found the wanted number (1000) in the raw2 col1 ,
it gives me the other 4 number (345 445 888 777).
and put them in an array.
the cells with number in the excel workspread are variable from 0 to ...,
the script should be able to read all the cells of the raw till the first
empty cell.
there is someone could help me
Thanks Carlo
 
J

John J. Trammell

I need to read data from EXCEL worksheets in this way:
The script perl asks me to write a number .
I type a Number f.e. 1000 , the script should look for the number 1000
inside a
excel worksheet file and if it find it, should capture all the other
numbers reported in the raw where there is the number 1000.
the mother number (1000) is always in the first colomn of excel sheet.

col1 col2 col3 col4 col5
raw1 900 002 004 006
raw2 1000 345 445 888 777

once the script had found the wanted number (1000) in the raw2 col1 ,
it gives me the other 4 number (345 445 888 777).
and put them in an array.
the cells with number in the excel workspread are variable from 0 to ...,
the script should be able to read all the cells of the raw till the first
empty cell.

Sounds like you need the Spreadsheet::parseExcel module.
 
C

Carlo Cazzaniga

Thanks ,
but I'm not an expert , my environment is NT,
thweversion of perl is 5
How can I call the the mentioned Cpan module,
I don't use visual perl or other recently version.
I have coded a simple script..
Carlo
 
G

Gunnar Hjalmarsson

[ Please do not top post! You should study the posting guidelines for
this group:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html ]

Carlo said:
Thanks ,
but I'm not an expert , my environment is NT, thweversion of perl
is 5
How can I call the the mentioned Cpan module,
I don't use visual perl or other recently version.
I have coded a simple script..

I'm not sure what you want to say with that. "Expert" or not, if you
want to read data from an Excel file, you'd better use a non-standard
module, and if it wasn't installed before, you need to install that
module as well as a couple of other modules that it is dependent on.

Actually, before answering your question, I did just that. These were
the modules I installed:

Spreadsheet::parseExcel
OLE::Storage_Lite
IO::Stringy
Spreadsheet::parseExcel::Simple

I used the CPAN module, which worked fine in this case even if I'm on
a Windows platform (W98), since none of those modules requires
compilation.

http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq8/How_do_I_install_a_module_from_CPAN.html
 
F

Fengshui

I would like to know if excel file is a BINARY or TEXT file. I konw .csv is
text file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top