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.

Sat Nov 14, 2015 6:27 pm

Dear all,,,

Hope you're fine and doing well.

I'm having an issue while trying spire.Office in order to create XLS files.

Firs thing as following:

When I exceed the column range AA spire rises an error as following:

System.ArgumentOutOfRangeException was unhandled by user code
HResult=-2146233086
Message=StartIndex cannot be less than zero.
Parameter name: startIndex
ParamName=startIndex
Source=mscorlib
StackTrace:
at System.String.Substring(Int32 startIndex, Int32 length)
at spr1140.0(String A_0, Int32& A_1, Int32& A_2)
at spr1140.1(String A_0)
at spr1140.0(String A_0, IWorkbook A_1, Int32& A_2, Int32& A_3, Int32& A_4, Int32& A_5)
at Spire.Xls.Core.Spreadsheet.XlsRange.get_Item(String name, Boolean IsR1C1Notation)
at Spire.Xls.Core.Spreadsheet.XlsRange.get_Item(String name)
at Spire.Xls.CellRange.get_Item(String name)
at BHFuture.Core.Providers.SpaceOutProvider.ExportTemplate(String Folder) in \\Mac\Home\Desktop\EleanorPC\Projects\Doom\Source\Release201501171100\ProjectPCPFuture\BHFuture.Core\Providers\SpaceOutProvider.cs:line 703
at BHFuture.Core.Tests.SpaceOutTest.RunTest() in \\Mac\Home\Desktop\EleanorPC\Projects\Doom\Source\Release201501171100\ProjectPCPFuture\BHFuture.Core\Tests\SpaceOutTest.cs:line 152
at BHFuture.Core.Tests.TestEngine.RunTest() in \\Mac\Home\Desktop\EleanorPC\Projects\Doom\Source\Release201501171100\ProjectPCPFuture\BHFuture.Core\Tests\TestEngine.cs:line 42
at BHFuture.MainWindow..ctor() in \\Mac\Home\Desktop\EleanorPC\Projects\Doom\Source\Release201501171100\ProjectPCPFuture\BHFuture\MainWindow.xaml.cs:line 34

Is this due to the limitation of the using it without a license?

Second thing:

I requested a license for Spire.Office for .Net but then I released I'm using it for WPF does this issue matters when using the 1 month evolution license ?

Regards & thanks for this great product.

mauth247
 
Posts: 3
Joined: Wed Nov 11, 2015 4:51 pm

Mon Nov 16, 2015 2:47 am

Hi,

Thanks for your inquiry.
The temporary license file of Spire.Office for WPF has been sent to you, please check your e-mail.
If the issue still exists after applying the license, please provide us with your code and xls and document to help us do an investigation.
Thanks.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Tue Nov 17, 2015 9:15 am

Dear,,,

Hope you're having a nice day so far.

I got the new license and I followed the instructions. But it seems like the error is the same and as well when exporting the evaluation warning is still there.

The code rising the error is as following:

string column = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

sheet.Range[column[0] + column[CounterColumn++] + CounterRow.ToString()].Text = "DriveHeadID";

It should be AA1.

But when I do this

sheet.Range["A" + column[CounterColumn++] + CounterRow.ToString()].Text = "DriveHeadID";

it works fine for the AA issue but again the evaluation warning is still there.

Regards

mauth247
 
Posts: 3
Joined: Wed Nov 11, 2015 4:51 pm

Tue Nov 17, 2015 9:38 am

Hello,

Thanks for the information. What are the dlls you were using?

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Nov 17, 2015 9:48 am

Hello,

Code: Select all
string column = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
sheet.Range[column[0] + column[CounterColumn++] + CounterRow.ToString()].Text = "DriveHeadID";

Seen from the codes you provided, the value of column[0] is char not string, please convert it to string.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Nov 17, 2015 12:46 pm

Oh Dear,,,

Sorry for all the fuss ... my bad ... as for the license I got a new one and I'm going to download the right dll and try them again and I'll inform you with the result ... Thank you.

mauth247
 
Posts: 3
Joined: Wed Nov 11, 2015 4:51 pm

Return to Spire.XLS