Attempting to read Aspose.Cell for an embedded Excel object in powerpoint read in Aspose.Slides causes the following error.
“This file’s format is not supported or you do not specify a correct format.”
The environment is below.
powerpoint file -> Office 2016 or Office 365
Embedded excel file -> Office 2016 or Office 365
Aspose.Slides -> 18.10
Aspose.Cells -> 18.11
Please share a console application (runnable) with us for our testing where this issue can be observed. We will reproduce the problem and provide our feedback after analysis.
I have reproduced the error on my end with your source code. Could you please also share the template file for which this error is not produced, so that I can log it in our issue management system for a fix.
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
We evaluated your issue thoroughly. Well, It must be the issue of Aspose.Slides API. Please change your sample code as the following without using Aspose.Cells APIs:
e.g Sample code:
var oleObj = (OleObjectFrame)shape;
if (oleObj.ObjectData != null && oleObj.ObjectProgId.Contains("Excel"))
{
MemoryStream byteObj = new MemoryStream(oleObj.ObjectData);
File.WriteAllBytes(dir + "test.xls", byteObj.ToArray());
//FileFormatInfo fileInfo = FileFormatUtil.DetectFileFormat(byteObj);
//if (fileInfo.FileFormatType == FileFormatType.Unknown)
//{
//}
//Workbook wb = new Workbook(byteObj);
}
You will notice that the generated file could not be opened fine in MS Excel too.
Please post your issue in Aspose.Slides forum, one of our fellow colleagues from Aspose.Slides team will help you soon there.