in reply to Group cols with row number Spreadsheet::ParseExcel perl
Anonymous Monk:
Yes, you can use a counter in your loop to put a unique value in the hash. You can even put the row and column in there, if you wanted:
my $cnt_unique=0; for my $row (1 .. $row_max) { ... row prep stuff for my $col (1 .. $col_max) { ... col prep stuff ... my $hr = ... your hash for the cell ... # Add unique number: $hr->{KEY} = $cnt_unique++; # Add row & column: $hr->{ROW} = $row; $hr->{COL} = $col; } }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|