0

I'm quite new in perl, so I'm asking for tips for the problem below : I have a excel file and I want to search for specific words in column title (1st row) then if it matches I extract the entire column and put it in a array (or whatever else).

So in my array, I will have first column then 2nd etc... until the end of the search.

I'm intending after that to read my array line by line to process data in order (I'm confortable for that part).

thanks

Dakar
  • 3
  • 2

3 Answers3

1

Take a look at Spreadsheet::Read. It reads the whole Excel sheet in an array-hash-ref, which you can search.

Demnogonis
  • 3,172
  • 5
  • 31
  • 45
0

Look at Spreadsheet::Read. The results come out $ref->{cell}->[arrayref_of_columns] so you can match against index [1] of that array ref and if it matches, that whole arrayref is your column.

jshy
  • 111
  • 6
0

Personally, I always prefer to export Excel files to XML format using Save as->XML Spreadsheet 2003 and use XML::Simple. However, there are a few Excel parsers too.

Spreadsheet::ParseExcel and Spreadsheet::XLSX, of which you probably want the latter.

NOTE: I haven't used ReadExcel, but it looks good too.

Eric Fossum
  • 2,395
  • 4
  • 26
  • 50