unvell / ReoGrid

Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
https://reogrid.net
MIT License
1.33k stars 395 forks source link

Error when loading xlsx with line chart. #127

Closed NPR18041 closed 4 years ago

NPR18041 commented 6 years ago

An error occured while trying to load an xlsx file containing line chart inside. but when I deleted line chart from xlsx file and load file again, It worked.

Error this line workBook.Load(pathFileTextBox.Text, FileFormat.Excel2007, Encoding.UTF8);.

... A first chance exception of type 'unvell.ReoGrid.Formula.FormulaParseException' occurred in unvell.ReoGrid.dll unvell.ReoGrid.Formula.FormulaParseException: unexpect token: point at unvell.ReoGrid.Formula.Parser.Parse(IWorkbook workbook, Cell cell, String input) at unvell.ReoGrid.Formula.Evaluator.Evaluate(IWorkbook workbook, String input) at unvell.ReoGrid.IO.OpenXML.ExcelReader.ReadDataSerial(WorksheetChartDataSource dataSource, Worksheet rgSheet, IChartSerial serial) at unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadChart(Worksheet rgSheet, ChartSpace chartSpace) at unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadGraphic(Document doc, Worksheet rgSheet, Drawing drawingFile, GraphicFrame graphicFrame) at unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadDrawingObjects(Document doc, Worksheet sheet, Worksheet rgSheet, Drawing drawingFile) at unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadWorksheet(IWorkbook rgWorkbook, Document doc, WorkbookSheet sheetIndex) at unvell.ReoGrid.IO.OpenXML.ExcelReader.ReadStream(IWorkbook rgWorkbook, Stream stream) at unvell.ReoGrid.IO.ExcelFileFormatProvider.Load(IWorkbook workbook, Stream stream, Encoding encoding, Object arg) at unvell.ReoGrid.Workbook.Load(Stream stream, FileFormat fileFormat, Encoding encoding) at unvell.ReoGrid.Workbook.Load(String path, FileFormat fileFormat, Encoding encoding) at unvell.ReoGrid.ReoGridControl.Load(String path, FileFormat fileFormat, Encoding encoding) ...

How to fix it. Check it please. @jingwood Thank you.

jingwood commented 6 years ago

It looks like some syntax used in formula from Excel that ReoGrid doesn't support. point? You may ignore this problem if you don't care the formula.

NPR18041 commented 6 years ago

I found it. Thank you.