Active Report xlsx Export Generating Exception

Posted by: sharad_77 on 14 September 2017, 6:46 pm EST

    • Post Options:
    • Link

    Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hi,

    While doing Excel export (office 2007 Format: xlsx) we are getting Exception. We checkeck with pdf format and we are not getting any error.

    we are attaching a dummy report in RDF format Also we have included the Screen shot.When you export this file into XLSX format you will get following error.

    Exception details:

    System.ArgumentException: ‘.’, hexadecimal value 0x00, is an invalid character.

    at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)

    at System.Xml.XmlUtf8RawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd)

    at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)

    at System.Xml.XmlWellFormedWriter.WriteString(String text)

    at DocumentFormat.OpenXml.OpenXmlElement.WriteAttributesTo(XmlWriter xmlWriter)

    at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)

    at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)

    at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)

    at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)

    at DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter)

    at DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart)

    at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save()

    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents()

    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing)

    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose()

    at #tLD.#GOw.#rjx(Stream outputStream)

    at #tLD.#GOw.Export(Workbook workbook, Stream outputStream)

    at GrapeCity.SpreadBuilder.Workbook.Save(Stream outputStream)

    at GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, Stream outputStream, String pageRange)

    at GrapeCity.ActiveReports.Viewer.Win.Internal.ViewerApi.Export(IDocumentExportEx filter, Stream stream, String pageRange)

    at GrapeCity.ActiveReports.Viewer.Win.Viewer.Export(IDocumentExportEx filter, Stream stream)

    at GrapeCity.ActiveReports.Win.Export.SectionExport.DoExport(ExportViewer viewer, String fileName)

    at GrapeCity.ActiveReports.Win.Export.ExportForm.btnOK_Click(Object sender, EventArgs e)

    Regards

    sharad kumar

    [/activereports_archive]

    2014/08/Error-RDFFileWithScreenshot.zip

  • Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hello Sharad,

    Thank you for providing the rdf document. I could reproduce the error at my end as well when exporting to Excel. The issue seems to be related to the data in the report, where the excel parser of the report is failing. I would request you to send across your application and the actual report which was used to create the rdf document along with the data source. It’ll be helpful for me to narrow down the issue.

    Thanks

    Abdias[/activereports_archive]

  • Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hello AbdiasM ,

    It is good after lots of R&D we are able to narrow down the issue. I am attaching a sample project.

    Please put Active report DLL (7.2.7895.0) on the folder

    …\Active Report Excel Export Error\ARDLLs\AR7

    In the SQL script Folder. You will find the script which will create the table and insert the data.

    The Excel export problem occurs when CatchetoDisk property on.

    objRpt.Document.CacheToDisk = True

    objRpt.Document.CacheToDiskLocation = strExportPath

    If you comment out the above code, there will not be any problem while exporting to Excel format.

    Since we are generating very large volume report, It is not an option for us to comment catchtodisk property.

    Regards

    Sharad Kumar

    [/activereports_archive]

    2014/09/Active-Report-Excel-Export-Error.zip

  • Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hello Sharad,

    Thank you for the application. I could reproduce the issue here as well. This issue is fixed in the latest ActiveReports 7 version (7.3.7973.0) which you can download from the following link : http://publicfiles.componentone.com/ActiveReports/ActiveReports%207/ActiveReports%20Developer%20v7.3.7973.0.msi

    Regards

    Abdias[/activereports_archive]

  • Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hello AbdiasM ,

    I have similar issue when using ActiveReport 10.0.5602.0. Would you please help with it?

    [ArgumentException: ‘’, hexadecimal value 0x05, is an invalid character.]

    System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize) +2452074

    System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd) +5501414

    System.Xml.XmlUtf8RawTextWriter.WriteString(String text) +62

    System.Xml.XmlWellFormedWriter.WriteString(String text) +95

    DocumentFormat.OpenXml.OpenXmlLeafTextElement.WriteContentTo(XmlWriter w) +45

    DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) +232

    DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) +98

    DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) +232

    DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) +98

    DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter) +298

    DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart) +146

    DocumentFormat.OpenXml.OpenXmlPartRootElement.Save() +16

    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents() +160

    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing) +27

    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose() +20

    #tLD.#GOw.Export(Workbook workbook, String path) +146

    GrapeCity.SpreadBuilder.Workbook.Save(String filePath) +39

    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath, String pageRange) +79

    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath) +15

    Thanks,

    Ruiwei[/activereports_archive]

  • Posted 14 September 2017, 6:46 pm EST

    [activereports_archive]Hello,

    I have replied to your issue on the following forum link :

    http://arhelp.grapecity.com/groups/topic/export-as-excel-error/

    You are requested to revert on the same to maintain Issue tracking.

    Regards,

    Reema[/activereports_archive]

  • Posted 9 June 2020, 3:02 am EST

    Hey Team,

    Just curious to know that this fixed is not applied to higher version (like 8.X, 9.X, 10.X etc) of active report?

  • Posted 10 June 2020, 2:26 am EST

    Hello,

    The report attached here is able to export into xlsx format with the latest version.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels