Hi,
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:
<ProtectObjects>True</ProtectObjects>
<ProtectScenarios>True</ProtectScenarios>
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())
{
xml.Save(updatedFile);
updatedFile.Seek(0, SeekOrigin.Begin);
return new Workbook(updatedFile, loadOptions);
}
}
Thanks,
Lukasz