Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Excel export merge is not working
posted

An exception of type 'System.InvalidOperationException' occurred in Infragistics4.WebUI.Documents.Excel.v11.1.dll but was not handled in user code

Additional information: Merged cell regions can't overlap.

here is my code:

sheet.MergedCellsRegions.Add(firstRowIndex, firstColIndex, lastRowIndex, lastColIndex)

Parents
No Data
Reply
  • 4315
    Offline posted

    Hello, Muhammad. 

    I've checked the source code of the Excel Exporter and see that this error is thrown on purpose. Additional comment on that error is the following:

    // Make sure this region will not overlap with any other merged cell regions or array formulas

    Is it possible that you have another merged cell region that overlap with that one?

    In addition you can check this forum thread, where you will find a working sample. If you are able to reproduce the problem, using that sample, then I can continue investigating the issue.

    Here is a topic describing how to create merged cells regions. I hope it also can help you.

    Thank you for using our product!
    Best regards,
    Nikolay Alipiev
    Software Developer

Children
No Data