Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Tue Nov 28, 2017 1:36 am

Problem 1: Workbooks with a sheet that has all cells empty such as HiImEmpty.xlsx throws an IndexOutofRange exception on SaveToStream(). I can catch the exception to work around it, but it's a poor allocation of resources for such a common condition.

Problem 2: verticalIsBad.xlsx System.NotSupportedException (included in attached zip file) "It is not supported for this Vertical Axis type" This is unfortunate, but we can catch the exception and move on. The problem is that after this particular exception is encountered we see a significant increase in System.NullReferenceExceptions that escape the catch block and crash the application.

Included is sample code running the code with option "G" opens all three of the included files verticalisbad.xlsx and writes the exceptions that we encounter just for reference to this bug.

To re-create Problem 2: Run mode R
R mode will open veriticalisbad.xlsx then a known good file that is included and the test code prompts you for how many times you want to do this sequence. In our tests we tell it to run 10 times and by the 3rd the application usually has crashed.
Attachments
SpireBugs.zip
(346.44 KiB) Downloaded 106 times

ohoeflein
 
Posts: 3
Joined: Wed Nov 15, 2017 9:33 pm

Tue Nov 28, 2017 4:55 am

Hello,

Thanks for your inquiry.
I have reproduced the issues you mentioned and referred them to our dev team for a further investigation.
Once there's any update, I will let you know.
Besides, there's a temporary workaround for you on issue 1, you could make a judgment to exclude the empty worksheets.
Code: Select all
foreach (Worksheet wrksheet in book.Worksheets)
            {
                if (!wrksheet.IsEmpty)
                {
                    wrksheet.SaveToStream(stream, "\t");
                }

            }


Sincerely,
Jane
E-iceblue support team
User avatar

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

Tue Nov 28, 2017 6:01 pm

That's great thank you we look forward to a resolution. So far the product has performed pretty well as we have been throwing lots of different documents at it. We realize what you guys are attempting to do in parsing all these documents types can be difficult.

ohoeflein
 
Posts: 3
Joined: Wed Nov 15, 2017 9:33 pm

Tue Nov 28, 2017 6:11 pm

We are not seeing an isEmpty property on the worksheet object. We are using version 2.2.39

ohoeflein
 
Posts: 3
Joined: Wed Nov 15, 2017 9:33 pm

Wed Nov 29, 2017 2:33 am

Hello ohoeflein,

Thanks for your feedback.
Kindly note the worksheet object under Spire.Spreadsheet has no property "isEmpty", you should change it to the worksheet under Spire.XLS. Please refer to the below code.
Code: Select all
         
 foreach (Spire.Xls.Worksheet wrksheet in book.Worksheets)
  {
       if(!wrksheet.IsEmpty)
        {
            wrksheet.SaveToStream(stream, "\t");
        }
   }

Besides, kindly note that Spire.Spreadsheet is to an extent an Excel viewer which supports some simple editing features. If you would like a more completed and robust editing component, Spire.XLS should be a better choice.
If there's still any doubt, welcome to write back.

Sincerely,
Jane
E-iceblue support team
User avatar

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

Thu Dec 14, 2017 6:45 am

Hello,

Glad to inform that the issue has been resolved in the Spire.XLS Pack(Hotfix) Version:7.12.130. Once the hotfix for the Spire.Spreadsheet is released, I will notify you again.

Sincerely,
Jane
E-iceblue support team
User avatar

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

Return to Spire.XLS