Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: excel sheet to xml

by roboticus (Chancellor)
on May 16, 2012 at 10:42 UTC ( [id://970805]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://970805]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found