Don't ask to ask, just ask | |
PerlMonks |
Re: excel sheet to xmlby roboticus (Chancellor) |
on May 16, 2012 at 10:42 UTC ( [id://970805]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|