We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Worksheets properties not carried from SpreadsheetML to Workbook object


Could you please advise on why Properties are not copied when constructing Workbook with MemoryStream from SpreadsheetML?

I load the SpreadsheetML file from the path and the xml object does contain:


Where the new object “new Workbook(updatedFile, loadOptions)” does not have tchem, either with loadOptions or not.

        using ( var stream = new FileStream( path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite ) )
            var xml = System.Xml.Linq.XDocument.Load(stream);
            using (var updatedFile = new MemoryStream())
                updatedFile.Seek(0, SeekOrigin.Begin);
                return new Workbook(updatedFile, loadOptions);


Oh, apologies, I have not been accurate, it does contain the Properties, however, they are false.


Thanks for sharing us the sample code and details.

Please provide us your template SpreadsheetML file, so we could evaluate your issue on our end. Also, how do you check the properties via Aspose.Cells APIs in code?

Thank you for your prompt response.

Hereby the SpreadsheetML attached.

I check them in Debug mode. after creating Workbook object from the stream I inspect the object to see that the below are set to True instead of False.

        workbook.Worksheets[0].Protection.AllowEditingObject = true;
        workbook.Worksheets[0].Protection.AllowEditingScenario = true;<a class="attachment" href="/uploads/default/7127">EFile.zip</a> (2.8 KB)

EFile.zip (2.8 KB)


Thanks for the template file.

I observed the issue as you mentioned by using the simplest lines of code with your template SpreadsheetML file. I found Worksheets protection properties are not carried from SpreadsheetML to Workbook.
Sample code:

 Workbook workbook = new Workbook("e:\\test2\\EFile.xml"); 


I have logged a ticket with an id “CELLSNET-45687” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

I am looking forward to hearing from you.



Would the future fix include carrying all properties from SpreadsheetML to Workbook?

I was wondering if I should log with you some other issues with properties not being carried, as I have observed that AllowInsertingHyperlink and adding a comment are not carried.



Well, the fixed version for your issue would include the fix of your mentioned issue only. It is better you should add respective threads (one per each issue) with all the details, sample code and template files, etc. to highlight each issue, we will log appropriate tickets for your issues.

Thank you for your response


Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-45687 now. We will soon provide the fix after performing QA and including other enhancements and fixes.


Please try our latest version/fix: Aspose.Cells for .NET v17.9.5.

Your issue “CELLSNET-45687” should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-45687) have been fixed in Aspose.Cells for .NET 17.10.