in reply to excel columns and my ignorance

The Spreadsheet::XLSX SYNOPSIS shows how to access columns (as well as rows and individual cells).

-- Ken

Replies are listed 'Best First'.
Re^2: excel columns and my ignorance
by trickyq (Acolyte) on May 31, 2012 at 18:25 UTC

    I just don't get it. I don't even see how it shows me that. nothing there has helped me to figure out how to access only one specific column. I know its there, but I don't know what i'm looking for. can you type a line of code that would access/output column 0 say. If I could see it directly, I would get it. sorry

    Ken

      I don't know exactly what sort of comparison you want to do. The following (based on the SYNOPSIS code) may give you a starting point:

      ... # Comparing columns 3 and 5 my $cmp_col_1 = 3; my $cmp_col_2 = 5; foreach my $sheet (@{$excel -> {Worksheet}}) { ... foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) { # Here's where you'd compare # $sheet -> {Cells} [$row] [$cmp_col_1] # with # $sheet -> {Cells} [$row] [$cmp_col_2] } }

      -- Ken