Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How to merge cells using Spreadsheet::WriteExcel using Merge_range function ?

by ungalnanban (Pilgrim)
on Jul 14, 2010 at 09:26 UTC ( #849470=perlquestion: print w/ replies, xml ) Need Help??
ungalnanban has asked for the wisdom of the Perl Monks concerning the following question:

I have used Spreadsheet::WriteExcel for creating spreadsheet report.
I tried to merge some cells using merge_range() function.
$worksheet->merge_range(3,5,9,4,$title, $format); [OR] $worksheet->merge_range('E3:I4',$title, $format); $worksheet->write('F6',"LANGUAGE",$format);
it shows the error message like the following

Error: refer to merge_range() in the documentation. Can't use previously merged format in non-merged cell


How to solve this error. if I used write() functions that time only it shows the above error.
if I didn't used any write functions that time cells are merged.

Comment on How to merge cells using Spreadsheet::WriteExcel using Merge_range function ?
Download Code
Re: How to merge cells using Spreadsheet::WriteExcel using Merge_range function ?
by Corion (Pope) on Jul 14, 2010 at 09:30 UTC

    I guess the error message is right. You can't reuse a format for a nonmerged that you have already used on a merged cell.

    I guess you need to declare a second format for unmerged cells.

      Thanks Corion Now its working fine. thanks for your immediate replay

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-09-22 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (206 votes), past polls