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.

Fri Mar 31, 2017 9:00 pm

Hi

I have a file with a pivot table. Due to an error in creating the pivot table (See the post previously from me - where it has been acknowledged and sent to the dev team) the workaround is to save the workbook to a memory stream and then load from stream (I wrap it in a using statement to dispose of the memory stream.

I know need to save the workbook to Azure storage and so need it saved to a stream first and then sent to Azure.

If I do this, I get an error the second time as follows:

3/31/2017 8:54:24 PM Specified argument was out of the range of valid values.
Parameter name: iStartPos

stacktrace: at spr1640.0(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Xls.Core.Spreadsheet.RichTextString.SetRichTextFont(Int32 iStartPos, Int32 iEndPos, IFont font)
at Spire.Xls.Core.Spreadsheet.RichTextString.SetFont(Int32 startIndex, Int32 endIndex, IFont font)
at Spire.Xls.Core.Spreadsheet.XlsWorksheet.0(Int64 A_0, Boolean A_1, RichTextString A_2, Boolean A_3, Boolean& A_4)
at Spire.Xls.Core.Spreadsheet.XlsWorksheet.0(Int32 A_0, Int32 A_1, Int32 A_2, Boolean A_3)
at Spire.Xls.Core.Spreadsheet.XlsWorksheet.AutofitRow(Int32 rowIndex, Int32 firstColumn, Int32 lastColumn, Boolean bRaiseEvents)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.SaveAs(Stream stream, ExcelSaveType saveType, ExcelVersion version)
at Spire.Xls.Workbook.SaveToStream(Stream Stream, FileFormat fileFormat)
at Atlas.Toolkit.Utilities.ExcelManager.<CreateScorecardPivot>d__0.MoveNext() in ExcelManager.cs:line 245


line 245 is wb.SaveToStream(me, FileFormat.Version2013);

The strange thing is that if I save it directly to a local file instead (wb.save("documents", FileFormat.Version2013) then it works with no errors.

ppdevs
 
Posts: 20
Joined: Sat Jan 09, 2016 7:23 pm

Mon Apr 03, 2017 5:30 am

Hello,

Thanks for yor inquiry and sorry for the late reply as weekend.
Concerning your case, could you provide us with your file for a better investigation? You could remove the confidential part as long as the issue still exists.

Sincerely,
Jane
E-iceblue support team
Last edited by Jane.Bai on Wed Apr 05, 2017 9:24 am, edited 1 time in total.
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Wed Apr 05, 2017 9:24 am

Hi,

Could you please share your document so that we can reproduce the issue and give you the solution accordingly.
You can upload it here or send it to us by email(support@e-iceblue.com).

Many Thanks,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.XLS