Hello,
I'm trying your free version of the Spire.XLS in order do a proof of concept by taking an Excel file and exporting it as a HTML in vb.net. I've used your HelloWorld sample and modified it to save as HTML file. The Excel file I'm using is Excel 2010 which has over 10 worksheets but I'm only converting one of them sheet "Sheet1". Sheet1 uses formulas to pull data from the other worksheets and the other worksheets are pivot tables pulling data from SQL Server Analysis services cubes. Sheet1 has less than 60 rows in it.
The issue I'm having is the export to HTML fails when any of the other worksheets with the pivot tables exist. If I delete all the other worksheets and leave the "Sheet1" then the export to HTML works.
The error returned from Visual Studio is "index out of bounds". I've pasted the error below.
Does your product support exporting a worksheet that is refercering cells in other worksheets that contain PivotTables?
System.ArgumentOutOfRangeException was unhandled
Message="Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
ParamName="index"
Source="mscorlib"
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Spire.Xls.Core.Spreadsheet.Collections.CollectionBase`1.get_Item(Int32 i)
at spr3230.13(XmlReader A_0, XlsPivotTable A_1)
at spr3230.18(XmlReader A_0, XlsPivotTable A_1)
at spr519.0(IWorksheet A_0, String A_1, RelationsCollection A_2)
at spr519.0(IWorksheet A_0)
at spr4295.2()
at spr266.0(List`1& A_0)
at spr266.1(List`1& A_0)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(Stream A_0, String A_1)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(Stream A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.0(String A_0, String A_1, ExcelVersion A_2, ExcelParseOptions A_3)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(spr2465 A_0, Object A_1, String A_2, ExcelParseOptions A_3, Boolean A_4, String A_5, ExcelVersion A_6)
at spr859.0(Object A_0, String A_1, ExcelParseOptions A_2, Boolean A_3, String A_4, ExcelVersion A_5)
at spr1010.0(String A_0, ExcelParseOptions A_1, Boolean A_2, String A_3, ExcelVersion A_4)
at Spire.Xls.Workbook.LoadFromFile(String fileName, ExcelVersion version)
at Spire.Xls.Workbook.LoadFromFile(String fileName)
at Spire.Xls.Sample.Form1.btnRun_Click(Object sender, EventArgs e) in C:\Program Files (x86)\e-iceblue\Spire.XLS-FE\Demos\VB\WinForms\01_Quick guide\HelloWorld\Form1.vb:line 135
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Spire.Xls.Sample.Form1.Main() in C:\Program Files (x86)\e-iceblue\Spire.XLS-FE\Demos\VB\WinForms\01_Quick guide\HelloWorld\Form1.vb:line 108
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: