Posted 20 August 2020, 10:54 am EST
Hello:
I am developing a component that uses ActiveReports 11 to export a SectionReport to a XLSX file (the report has colors, multiple pages with subreports, etc,). I want my code to export any and each of the subreports datasources in the same XLSX file. For that matter I use a C1FlexGrid 2.6 in which I assing each datasource and try to export a new Sheet with the subreport’s name. When the code reaches the first dataGrid.SaveExcel, it fails with the error:
Exception Type:
System.ArgumentException
Message:
Invalid Excel OpenXml file (*.xlsx).
Source:
C1.Win.C1FlexGrid.2
TargetSite:
Void (System.String, Boolean)
StackTrace:
en e..(String msg, Boolean badArgument)
en e..(Boolean condition)
en e..(XmlReader reader, String domain)
en e..( zipFile)
en e..( zipFile, Boolean fillSheets)
en e..( zipFile, Boolean fillSheets)
en e..(String fileName, Boolean fillSheets)
en e..(String fileName, format, Boolean fillSheets)
en ..(C1FlexGridBase flex, String fileName, String sheetName, FileFlags flags, PrinterSettings ps)
en C1.Win.C1FlexGrid.C1FlexGridBase.SaveExcel(String fileName, String sheetName, FileFlags flags)
If I try to open the XLSX file generated by ActiveReports 11, it opens with no problem.
Can you help me, please, to overcome this problem?
Thanks in advance from Argentina.
Ariel.