You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple non-overlapping Range.merge() calls produce a corrupted XLSX workbook #2551
Description
I'm seeing what appears to be a bug in syncfusion_flutter_xlsio when more than one non-overlapping range is merged.
Expected behaviour
Both merged ranges should be written independently to the workbook.
Merged ranges:
Q61:AD61
R65:W65
Excel should open the workbook without reporting any problems.
Actual behaviour
When two merge() calls are made:
Excel reports that the workbook is corrupted and offers to repair it.
After repair, the two separate merged regions have been combined into a single merged area.
Content from the second merged region is lost.
If either merge() call is removed, the workbook opens correctly.
Environment
syncfusion_flutter_xlsio: 34.1.32
Flutter: 3.44.1
Dart: 3.12.1
Operating System: Windows 11
Microsoft Excel: Microsoft 365 Version 2606 (Build 20131.20154)
Steps to reproduce
Create a new Workbook.
Get the first worksheet.
Merge the range Q61:AD61.
Merge the non-overlapping range R65:W65.
Save the workbook to an .xlsx file.
Open the file in Microsoft Excel.
Code sample
Code sample
import'package:syncfusion_flutter_xlsio/xlsio.dart';
voidmain() {
finalWorkbook workbook =Workbook();
finalWorksheet sheet = workbook.worksheets[0];
sheet.getRangeByName('Q61:AD61').merge();
sheet.getRangeByName('R65:W65').merge();
finalList<int> bytes = workbook.saveAsStream();
workbook.dispose();
// Save bytes to an .xlsx file.
}
Activity