I am attaching an ODS file which when extracting the attachments does not extract them correctly. The storage files are being extracted and not the contents of the storage. The same file created in a XLSX format extracts the contents of the storage files (in this case txt, tif, docx and zip).
The following is an abridged piece of code which shows what we are doing.
foreach (var worksheet in workbook.Worksheets)
{
var index = 0;
var oleObjects = worksheet.OleObjects;
foreach (var oleObject in oleObjects)
{
FileStream fs = null;
try
{
var filePath = "Attachment" + index;
fs = File.Open(filePath, FileMode.Create, FileAccess.Write);
using (var bw = new BinaryWriter(fs))
{
fs = null;
bw.Write(oleObject.ObjectData);
}
}
finally
{
fs?.Dispose();
index++;
}
}
}
It would be great if the attachments in the ODS format files were saved out the same as the xlsx format.
AsposeCellsExamples.zip (1.3 MB)