Posted 14 September 2017, 7:13 pm EST
[activereports_archive]Hello,
I have a issue when exporting report as xlsx file. Here is the error message I got.
By the way, exporting as PDF and txt are all correct.
You can test this by passing invalidChar to a report like below.
[csharp]
string invalidChar = Char.ConvertFromUtf32(5);
datatable.Rows[0][0] = dt.Rows[0][0] + invalidChar; report.DataSource = datatable;
[/csharp]
[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]