Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a database that is in excel,

Status
Not open for further replies.

ratz

Technical User
Oct 27, 2000
7
0
0
GB
I have a database that is in excel, to read it into perl and do calulations with it based on user input, I export it into text, save as .txt and read it in into Perl.

I would get the script to work directly from excel and skip the conversion to text.

I can get it to read directly from Excel with OLE, but the calculations do not work eg:

lets say that the excel file contains the following data and the resulting 2d array is @lol,

A B
1 10 1
2 10 2

This prints outs correctly with loops but the following does does not work:

$sum=$lol[0][0]+$lol[0][1];
print "$sum"; #prints 0


$length_of_lol= scalar (@lol);
print "$length_of_lol"; #prints 0



Can anyone point out whats wrong?


thanks


Ratz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top