title: How to merge cells using Spreadsheet::WriteExcel using Merge_range function?
body: <p>I have used <a href="http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel.pm" rel="nofollow noreferrer">Spreadsheet::WriteExcel</a> for creating spreadsheet report.</p>
  
  <p>I tried to merge some cells using merge_range() function.</p>
  
  <blockquote>
    <p>$worksheet->merge_range(3,5,9,4,$title,
    $format);
    [OR]</p>
    
    <p>$worksheet->merge_range('E3:I4',$title,
    $format);</p>
    
    <p>$worksheet->write('F6',"LANGUAGE",$format);</p>
  </blockquote>
  
  <p>it shows the error message like the following</p>
  
  <blockquote>
    <p>Error: refer to merge_range() in the
    documentation. Can't use previously
    merged format in non-merged cell</p>
  </blockquote>
  
  <p>How to solve this. if I used <code>write()</code> .. that time only it shows the error. if I didn't used any write functions that time the above error message is not showing and the cells are merged.</p>