in reply to excel sheet to xml

zeni:

The Spreadsheet::ParseExcel package will read the old .xls formatted spreadsheets, and the Spreadsheet::ParseExcel::Cell class contains an is_merged() function you can use to tell whether the cell is merged or not. (I'm not on a Windows box at the moment, so I can't show you what you'd get.) If it's the newer .xlsx format, you can use the Spreadsheet::XLSX module. I've not used this one before, but the docs mention that it populates the same classes as Spreadsheet::ParseExcel, so it should be mostly compatible.

For merged cell handling, I don't know what's returned exactly, but I'm thinking that if you don't have two adjacent groups of merged cells, you could just use the is_merged() method and use contiguous merged cells as a single cell. Even better would be if is_merged() returned a unique "block number" for each block of merged cells, then you could just use that.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: excel sheet to xml
by zeni (Beadle) on May 17, 2012 at 09:22 UTC

    i cannot find these newer modules in cpan :(

    cpan> get ParseExcel.pm Warning: Cannot get ParseExcel.pm, don't know what it is. Try the command i /ParseExcel.pm/ to find objects with matching identifiers.

    Pls help. I am new to cpan usage.

      zeni:

      Try "i Spreadsheet::ParseExcel".

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        Thank You.