We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error loading template.xls

Thread ID:





42610 Apr 3,2006 02:00 PM UTC Apr 4,2006 11:45 AM UTC WinForms 1
Tags: Calculate
Brian J. Burnett
Asked On April 3, 2006 02:00 PM UTC

This line of code ... wb = ExcelUtils.Open(fileName) generates this error... System.InvalidCastException was caught Message="Unable to cast object of type ''Syncfusion.XlsIO.Parser.Biff_Records.Formula.MemFuncPtg'' to type ''Syncfusion.XlsIO.Parser.Biff_Records.Formula.IReference''." Source="Syncfusion.XlsIO.Base" StackTrace: at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.GetRange(ChartAIRecord chartAi) at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.Reparse() at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.Parse(IList data, Int32& iPos) at Syncfusion.XlsIO.Implementation.Charts.ChartImpl.ParseSeries(IList data, Int32& iPos) at Syncfusion.XlsIO.Implementation.Charts.ChartImpl.ParseChart(IList data, Int32& iPos) at Syncfusion.XlsIO.Implementation.Charts.ChartImpl.ParseData() at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.Parse() at Syncfusion.XlsIO.Implementation.Shapes.ChartShapeImpl.ParseClientData(MsofbtClientData clientData, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.Shapes.ShapeImpl.ParseRecord(ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.Collections.ShapesCollection.AddShape(MsofbtSpContainer shapeContainer, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.Collections.ShapesCollection.AddShape(MsoBase shape, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.Collections.ShapesCollection.Parse(MsofbtSpgrContainer container, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.ParseMsoDgContainer(MsofbtDgContainer dgContainer, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.ParseMsoStructures(ArrayList arrStructures, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.ExtractMSODrawing(Int32 startIndex, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.WorksheetBaseImpl.Parse() at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseWorksheets() at Syncfusion.XlsIO.Implementation.WorkbookImpl.Parse(BiffReader reader, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, ExcelParseOptions options) at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(String Filename) at Syncfusion.XlsIO.ExcelUtils.Open(String fileLocation) at AllocationManager.XlsFileUsingExcelRW.ExceRWCalcWorkbook.CreateFromXLS(String fileName) in C:\Talisman\PARS.NET\Apps\AllocationManager\ExceRWCalcWorkbook.vb:line 55 Looks like a bug to do with Charts. When I delete three pie charts the xls loads.

Administrator [Syncfusion]
Replied On April 4, 2006 11:45 AM UTC

Hi Brian, I tried to reproduce the problem using this attached sample but was not able to see the problem. sample : 42610TemplateChart.zip The Sample will 1)Open a template file having a formula and a pie chart using code,wb = ExcelUtils.Open(fileName). 2)Edit the template file using XlsIO,by writing a value calculated using Calculate into the cell "B4" and insert a new pie chart to the template. Please take a look at the attachment.Let me know if this solves your issue. If not Could you please send us a template file in which you are having problem. Please let me know if you need any further assistance. Thanks, Bharath.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon