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.

Thu Dec 07, 2017 7:52 pm

Hi,
We are having trouble to load stream (xlsx file) whith the spire lib´s

I have a code below
Code: Select all
      byte[] _file = System.IO.File.ReadAllBytes(@"D:\document.xlsx");
                Workbook workbook = new Workbook();
                workbook.LoadFromStream(new MemoryStream(_file));       // freezes here!

                WorksheetsCollection sheets = workbook.Worksheets;


The file (document.xlsx) is inside attach document.rar
A thread stays in method "workbook.LoadFromStream" forever, not throw any exception.
Attachments
document.rar
(107.53 KiB) Downloaded 291 times

Veriz
 
Posts: 5
Joined: Mon Aug 14, 2017 2:34 pm

Fri Dec 08, 2017 2:09 am

Hello,

Thanks for your post. After an initial test with the most new version(Spire.XLS Pack Hotfix Version:7.12.125), I was unable to reproduce the issue. Please update to this version and try again.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Fri Dec 08, 2017 2:27 pm

Simon,

With the new lib version works fine.

Thanks so much.

Alioth Latour.

Veriz
 
Posts: 5
Joined: Mon Aug 14, 2017 2:34 pm

Mon Dec 11, 2017 1:26 am

Hello Alioth,

Thanks for your feedback. If there is any other question, please feel free to contact us.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Mon Dec 11, 2017 6:49 pm

Simon,

Thanks for your repply. Sorry for my mistake but with this hotfix all works fine when I´m working with XLSX documents but my solution also works with DOCX e PPTX documents.
So when I used this hotfix over the last version of Spire.Office for .NET (Version:2.16.23)
I have a problem with PPTX when I try to instance Presentation object like this:

Code: Select all
Spire.Presentation.Presentation presentation = new Spire.Presentation.Presentation();


Below are the exception message:
Não foi possível carregar arquivo ou assembly 'Spire.Pdf, Version=3.9.480.14040, Culture=neutral, PublicKeyToken=663f351905198cb3' ou uma de suas dependências.A definição do manifesto do assembly localizado não corresponde à referência do assembly. (Exceção de HRESULT: 0x80131040)

I think Spire.Pdf (Spire.Office for .NET - Version:2.16.23) and Spire.Xml (your hotfix version) needs a diferent version for Spire.Pdf

Veriz
 
Posts: 5
Joined: Mon Aug 14, 2017 2:34 pm

Tue Dec 12, 2017 1:49 am

Hello,

Thanks for your feedback. The Spire.XLS.dll v7.12.125 has not been merged into Spire.Office 2.16.23, that is why you will encounter the compatibility issue. The next version of Spire.Office will include the fix. Once it's available, we will let you know.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Dec 12, 2017 9:58 am

Simon,

Thanks for your answer, do you have a version from Spire.Presentation.dll that is compatibly with dependencies from Spire.Excel.dll new release (.125)? I´m processing a huge volume of documents and the current error with Spire.Excel.dll is crashing my application and so I can´t do anything to work around to avoid this (the crash are finalizing my application) and que processing queue is growing.

Thanks,

Alioth Latour

Veriz
 
Posts: 5
Joined: Mon Aug 14, 2017 2:34 pm

Tue Dec 12, 2017 10:05 am

Hello Alioth,

Thanks for your reply. I am sorry we don't have the version at present. We will provide you one as soon as we can.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Dec 13, 2017 11:12 am

Simon,

Now I have the same freezing problem with another XLSX document.

Follows the file where the problem occurs.

The freeze problem occur when I tested this call in a application made specificaly to reproduce the problem (a little windows forms application), on another test with the same xlsx file in complete code of my program, using a multi thread setup, the LoadFromStream function doens´t freeze but after your return I get a crash in my application caused by Spire (I think that this occur in a background thread used internaly by Spire, because I can´t catch this exception with a normal try/catch or with a global exception manner).

SpireError.PNG
SpireError.PNG (49.55 KiB) Viewed 6186 times


Message: System.NullReferenceException

Stacktrace:
em spr645.1(XlsWorksheet A_0, Dictionary`2 A_1)
em Spire.Xls.Core.Spreadsheet.XlsWorksheet.ParseData(Dictionary`2 dictUpdatedSSTIndexes)
em Spire.Xls.Core.Spreadsheet.XlsWorksheetBase.ParseData()
em Spire.Xls.Core.Spreadsheet.XlsWorksheet.10()
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.ClearAll()
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.DisposeAll()
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.Close(Boolean SaveChanges, String Filename)
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.Close(Boolean saveChanges)
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.Close()
em Spire.Xls.Core.Spreadsheet.XlsWorkbook.Finalize()
Attachments
29242.zip
(24.94 KiB) Downloaded 275 times

Veriz
 
Posts: 5
Joined: Mon Aug 14, 2017 2:34 pm

Thu Dec 14, 2017 2:28 am

Hello Alioth,

Thanks for your feedback. I have noticed the issue and logged it into our bug tracking system. Once it fixed, we will let you know.
By the way,if there are other documents have the same issue, please also send them to us, then we could fix them together.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Fri Dec 15, 2017 8:17 am

Hello,

The temporary version of Spire.Office that doesn't have the freezing issue to "document.xlsx" is available now. Please download it and have a try.
http://www.e-iceblue.com/downloads/Temp ... .16.25.zip

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Dec 19, 2017 7:23 am

Hello,

Greeting from E-iceblue.
Has the temporary version resolved the issue?
We will appreciate it if you could give us some feedback.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.XLS