I am using the spreadsheet::xlsx module in a script im writing. I need to extract about 4 columns out of about 60. I need those specific columns for comparison and updating. I assume that I'll load the data into an array or an array of arrays for comparison. I am able to extract the contents of the file, but I cant figure out how to specify just those columns... I'll put the code i currently have below
use Spreadsheet::XLSX; $excel = Spreadsheet::XLSX -> new ('build.xlsx'); foreach my $sheet (@{$excel -> {Worksheet}}) { printf("Sheet: %s\n", $sheet->{Name}); $sheet -> {MaxRow} ||=$sheet -> {MinRow}; foreach $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { $sheet -> {MaxCol} ||= $sheet -> {MinCol}; foreach $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) { $cell = $sheet -> {Cells} [$row] [$col]; if ($cell) { open FILE, ">>buildop.txt" or die $!; printf FILE ("(%s , %s) => %s\n", $row, $col, $cell -> {Val}); close FILE; } } } } this just prints the results to a file so I could examine it and try to figure out how to get just those columns help -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/