Hi,
we have to load a excel which is a macro enabled excel, with Below code we are using :
Workbook workbook;
using (MemoryStream memoryStream = new MemoryStream(fileContent))
{
workbook = new Workbook(memoryStream, new LoadOptions(LoadFormat.Xlsx));
}
Stacktrace :
at ” . . ( € )
at ” . . ( € )
at ” .‡ .”• ()
at ” .‡ .Read()
at ” .† . (Workbook , LoadOptions )
at Aspose.Cells.Workbook. Ÿ (Stream , LoadOptions , Boolean )
Please find the attached File :
Hi,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue after opening your excel file using the following code with the latest version: Aspose.Cells
for .NET v8.5.1.2. The code throws the exception as you have mentioned.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43814 - Loading excel in xlsm format throws null reference error
C#
string filePath = @“F:\Shak-Data-RW\Downloads\ExcelIssue.xlsm”;
Workbook workbook =
new Workbook(filePath);
Exception:s
at ..( )
at ..( )
at ..()
at ..Read()
at ..(Workbook , LoadOptions )
at Aspose.Cells.Workbook.(Stream , LoadOptions , Boolean )
at Aspose.Cells.Workbook.(String , LoadOptions )
at Aspose.Cells.Workbook..ctor(String file)
at AsposeProject.Program.f1() in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 2032
at AsposeProject.Program.Main(String[] args) in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 301
A first chance exception of type 'System.NullReferenceException' occurred in AsposeProject.exe
An unhandled exception of type 'System.NullReferenceException' occurred in AsposeProject.exe
Additional information: Object reference not set to an instance of an object.
Hi,
Please try our latest version/fix: Aspose.Cells for .NET v8.5.1.3
We have fixed your issue now.
Let us know your feedback.
Thank you.
The issues you have found earlier (filed as CELLSNET-43814) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.