Hello merrymonk,
I am not really sure how this is happening on you excel sheet and you are not able to read the data by column and row. But there is a really nice simple tutorial How to read an Excel file in Perl that can you help you getting started.
To be honest without being able to replicate your problem I can not imagine any way that I could help you. Can you give it a try and based on the tutorial to write some code that replicates your problem?
The only alternative approach that I could think is to retrieve all data, e.g.
my @rows = Spreadsheet::Read::rows($book->[1]);
foreach my $i (1 .. scalar @rows) {
foreach my $j (1 .. scalar @{$rows[$i-1]}) {
say chr(64+$i) . " $j " . ($rows[$i-1][$j-1] // '');
}
}
Through the retrieved data and having a reference to each row and column of the data in the sheet you can search for the variable and look up your references. Very briefly this is the only that I could think out of my mine.
Update: Adding sample of code for the tutorial provided above, including proposed solution using key(s) the row and column of the file and value(s) the variables of each cell. Sample of code bellow:
Update2: Based on Using structured references with Excel tables I created a sample of data and retreive data based on reference.
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
|