Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Jan 27, 2016 10:38 pm

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:

jasonn
 
Posts: 1
Joined: Tue Jan 26, 2016 11:40 pm

Thu Jan 28, 2016 6:16 am

Hi,

Thanks for your posting and using our Spire.Xls component.
Please try Spire.XLS Pack Version:7.9 which is the latest version of Spire.Xls at present.
If the issue still exists after trying new version, please share your excel document and testing code for investigation.
Thank you. You can also send it to amy.zhao@e-iceblue.com.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Jul 03, 2018 7:10 am

Hi,
I get the same exception after loading .xlsx file which contains a pivot table with an external data connection.


System.ArgumentOutOfRangeException was unhandled
HResult=-2146233086
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(ExceptionArgument argument, ExceptionResource resource)
at Spire.Xls.Core.Spreadsheet.Collections.CollectionBase`1.get_Item(Int32 i)
at spr3994.13(XmlReader A_0, XlsPivotTable A_1)
at spr3994.18(XmlReader A_0, XlsPivotTable A_1)
at spr660.0(IWorksheet A_0, String A_1, RelationsCollection A_2)
at spr660.0(IWorksheet A_0)
at spr5326.3()
at spr342.0(List`1& A_0)
at spr342.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(spr3053 A_0, Object A_1, String A_2, ExcelParseOptions A_3, Boolean A_4, String A_5, ExcelVersion A_6)
at spr1061.0(Object A_0, String A_1, ExcelParseOptions A_2, Boolean A_3, String A_4, ExcelVersion A_5)
at spr1241.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 Test_Spire.Program.ConverExcel() in C:\Users\[User]\Documents\Visual Studio 2015\Projects\Test Spire\Test Spire\Program.cs:line 69
at Test_Spire.Program.Main(String[] args) in C:\Users\[User]\Documents\Visual Studio 2015\Projects\Test Spire\Test Spire\Program.cs:line 38
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


My code:
Code: Select all
            var workbook = new Workbook();
            workbook.LoadFromFile(@"D:\test.xlsx"); // <-- Exception here

            workbook.SaveToFile(@"D:\sampleExcel.pdf", Spire.Xls.FileFormat.PDF);
            System.Diagnostics.Process.Start(@"D:\sampleExcel.pdf");


After saving this file as .xls it works well.
It is reproduced in “7.12.120.14040” and “8.6.6.6040” versions.

Thanks

nikolai.m
 
Posts: 5
Joined: Mon Jul 02, 2018 2:22 pm

Tue Jul 03, 2018 7:23 am

Dear nikolai.m,

Thanks for your inquiry.
In order to help us investigate further, please provide the input document which has the issue you mentioned.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jul 03, 2018 8:32 am

Hi,

I have attached the document.

Thanks
Attachments
test5.zip
File with the problem
(31.08 KiB) Downloaded 281 times

nikolai.m
 
Posts: 5
Joined: Mon Jul 02, 2018 2:22 pm

Tue Jul 03, 2018 9:15 am

Dear nikolai.m,

Thanks for your inquiry.
I have reproduced your issue and logged it in our bug tracking system. We will let you know once there is any update.
Sorry for the inconvenience.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Jul 09, 2018 12:02 pm

Hi,
A couple of questions:
1. Can you provide an approximate release date for the fix?
2. Is it possible to provide us a build with this fix for Spire.Office v2 so that we can avoid upgrading to the major version? (we use Spire.Office v2.16.23, xls lib is v7.12.120.14040)

Thanks

nikolai.m
 
Posts: 5
Joined: Mon Jul 02, 2018 2:22 pm

Tue Jul 10, 2018 1:50 am

Dear nikolai.m,

Thanks for posting.
1. Sorry that there is no ETA at present. However we have requested our development team to share an ETA at their earliest. We will update you as soon as we get a feedback.
2. Yes, we will provide you with a hotfix of Spire.Office.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Aug 07, 2018 4:04 am

Dear nikolai.m,

Glad to inform you that your issue is solved in Spire.Office Platinum (DLL Only) Version:3.8.0.
Look forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Aug 13, 2018 2:09 am

Dear nikolai.m,

Greetings from E-iceblue.
Did you use the hotfix ? Has your issue been resolved ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Aug 13, 2018 9:09 am

Hi

Spire.Office v3.8.0 works fine.
Is it possible to provide us a build with this hotfix for Spire.Office v2 so that we can avoid upgrading to the major version? (we use Spire.Office v2.16.23, xls lib is v7.12.120.14040)

Thanks

nikolai.m
 
Posts: 5
Joined: Mon Jul 02, 2018 2:22 pm

Mon Aug 13, 2018 9:36 am

Dear nikolai.m,

Thanks for your feedback.
So sorry that I misunderstand before, it is impossible to build an old version which includes the fix for you. We could offer a discount for customers to renew an existing license. If you need, please contact our sales team(sales@e-iceblue.com) and provide your purchase information(e.g. order number) because there is no record about purchase information according to your email.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Aug 13, 2018 10:19 am

Dear Betsy.jiang,

Thank you.
We will consider the offer to renew the license.

nikolai.m
 
Posts: 5
Joined: Mon Jul 02, 2018 2:22 pm

Tue Aug 14, 2018 1:30 am

Dear nikolai.m,

Thanks for your response.
Any question, just feel free to contact us.
Have a nice day.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS