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.

Tue Mar 15, 2022 3:05 pm

Hi,

I am using Spire.Officefor.NETStandard 7.2.3 with Dotnet 6.03 on Windows and have noticed quite a few regressions. I am putting them in separate topics to help better track them.

var currentCell = sheet.Rows[startRowPosition].CellList[startCellPosition];

produces (sometimes - not all the time using the exact same data each time).

An unhandled exception of type 'System.AccessViolationException' occurred
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The hard part about this exception is that it cannot be recovered from even using AccessViolationException which is painful for a web application.

The workaround is to instead use:

var currentCell = sheet.Range[startRowPosition + 1, startCellPosition + 1, startRowPosition + 1, startCellPosition + 1];

Cheers,

Alex

alexneblett01
 
Posts: 14
Joined: Sat Oct 18, 2014 2:09 pm

Wed Mar 16, 2022 7:47 am

Hello,

Thank you for your inquiry.
According to your description, I did an initial test, but did not reproduce the 'System.AccessViolationException' issue you mentioned. Please provide your test project (with the input Excel file that reproduce your issue) for us to investigate further. You could attach it here or send it to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS