Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: After parsing .xls the rows getting emerged

by tangent (Parson)
on Oct 09, 2015 at 16:22 UTC ( [id://1144320]=note: print w/replies, xml ) Need Help??


in reply to After parsing .xls the rows getting emerged

The docs for Spreadsheet::ParseExcel::SaveParser state that the module works "by reading it with Spreadsheet::ParseExcel and rewriting it with Spreadsheet::WriteExcel". So any merged cells will be lost when re-writing. You will need to use the WriteExcel module to re-create the merged cells, which means you will have to separate the reading and writing in your own script.

To merge the cells you use the "merge_range" method with a Format:
my $format = $workbook->add_format( align => 'left' ); $worksheet->merge_range('A1:C1', 'New Value', $format);
See the docs for Spreadsheet::WriteExcel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-29 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found