Hello i am simply trying to use your example to make an excel sheet with a line chart in it. Whenever i save it with the chart it gets courrpt. Without the chart it saves fine. Im using your example in the documents. Im using FLUTTER WEB. Im saving it different then using File since web doesnt support that. Please let me know why this is happening.
sheet.getRangeByName('M1').setText('City Name');
sheet.getRangeByName('M2').setText('Chennai');
sheet.getRangeByName('M3').setText('Mumbai');
sheet.getRangeByName('M4').setText('Delhi');
sheet.getRangeByName('M5').setText('Hyderabad');
sheet.getRangeByName('M6').setText('Kolkata');
sheet.getRangeByName('N1').setText('Temp in C');
sheet.getRangeByName('N2').setNumber(34);
sheet.getRangeByName('N3').setNumber(40);
sheet.getRangeByName('N4').setNumber(47);
sheet.getRangeByName('N5').setNumber(20);
sheet.getRangeByName('N6').setNumber(66);
//make chart
final ChartCollection charts = ChartCollection(sheet);
// Add the chart.
final Chart chart1 = charts.add();
// Set Chart Type.
chart1.chartType = ExcelChartType.line;
// Set data range in the worksheet.
chart1.dataRange = sheet.getRangeByName('M1:N6');
chart1.isSeriesInRows = false;
// set charts to worksheet.
sheet.charts = charts;
/ Save the document.
final List<int> bytes = workbook.saveAsStream(); //Dispose the workbook.
await FileSaver.instance.saveFile(name: 'SummaryData_' + processName,bytes: Uint8List.fromList(bytes),ext: 'xlsx',mimeType: MimeType.microsoftExcel);
workbook.dispose();
Hi Jesse,
We have tried a simple sample at our end, but are unable to reproduce the reported issue.
This sample can be downloaded from the below link.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample-1747230957
Please share your issue reproducing samples and screenshots to further validate it on our end.
Regards,
Mohamed Yusuf Khan.
file link. And also added the file. I also have the same problem and it's weird because it is all right when opened in Google Docs or open on a phone but not in any app. When I open it in MS Excel on my laptop or in WPS Office on my phone, it says corrupted file and also removes the chart from the file. I also get this.
"Removed Part: Document properties part. (Drawing shape)"
Attachment: FreeWay_Drive_(Demo)_(1)_46b85f5.zip
Amir, thats correct, same thing happening to me. Is this going to be fixed?
Hi Jesse,
We are able to reproduce the reported issue at our end and validating it currently. We will share the validation details on November 6th,2023.
Regards,
Anbazhagan R.
Hello any update on when this will be fixed? Its a bit urgent as i cant create any charts.
Hi Jesse,
We have validated the corrupted document and found the reason for the issue as the XML relations inside the Excel document is incorrect. However, we have fixed this kind of issue in our older version of XlsIO. We request you confirm whether you are using the latest flutter-xlsio package and share the version number. If possible, please share the modified issue reproducing sample from our earlier update to proceed further.
Regards,
Mohan.
Currently im using 23.1.40, il try to update to 44, what version what
syncfusion_flutter_xlsio: ^23.1.40Hi Jesse,
We have created a ticket for this query under your account and request you follow up this ticket for further updates.
Ticket link: https://support.syncfusion.com/support/tickets/520511
Regards,
Mohan.