Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Read Merge cell details from xls

by Himaja (Novice)
on Sep 18, 2016 at 14:25 UTC ( [id://1172059]=perlquestion: print w/replies, xml ) Need Help??

Himaja has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to read an excel file and got stuck at reading a merged cell. Using package Spreadsheet::Read. The sheet's hash contains an "attr" entry,in which, for each cell there is "merged" = 0 or 1 kind of an info. I have tried reading a sheet with merged cells and got merged = 0 on all the cells.

Also, according to the documentation of Spreadsheet::Read, there's supposed to be a "merged" entry in the sheet's hash, which gives the coordinates of all the merged areas in the excel sheet. I am unable to find such an entry. I am using version 5.10.1. Kindly let me know if there's a solution for this. TIA !

Replies are listed 'Best First'.
Re: Read Merge cell details from xls
by NetWallah (Canon) on Sep 18, 2016 at 15:09 UTC
    The documentation for API access to merged cells is sparse, and implementation of individual cell merged attributes depends on the sub-module selected.

    Here is a link to the Microsoft "mergearea" API call.

    I think you can get the equivalent of that merged range information if you use the spreadsheet (not cell) object:

    My $mergedAreas = $ss->{merged}; # Gets AOA

            ...it is unhealthy to remain near things that are in the process of blowing up.     man page for WARP, by Larry Wall

      Hi, as I mentioned earlier, my spreadsheet object does not have the "merged" entry that you asked me to use. Could it be a version issue? Thanks.

        Sorry - I'm not familiar with the module.

        You have not said what program/version generated the spreadsheet, he version of the module, or what your platform/os is. Perhaps there is a dependency there.

        Another possibility is that the key "merged" may have a different name, in your module version. Check for keys of %$ss, to see if any of them sound like "merged".

        Just trying to be helpful, but I'm out of suggestions at this point.

                ...it is unhealthy to remain near things that are in the process of blowing up.     man page for WARP, by Larry Wall

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found