For some reason when the Excel files are embedded they are embedding as EMBED(“Document”,"") and so are opening as a document inside the existing spreadsheet as well as opening in a new workbook.
I need the Excel files to embed as EMBED(“Worksheet”,"") as the embedded files will only open as a new workbook and not also inside the existing spreadsheet.
I have tested with the latest version: http://www.aspose.com/community/files/51/file-format-components/aspose.cells-for-.net-and-java/entry195573.aspx
it works, you need to use the line in your code while implementing the excel files as embedded objects:
sheet.OleObjects(0).FileType = OleFileType.Xls
Now when you open the generated file into MS Excel, you will see EMBED(“Worksheet”,"") selecting the object in the sheet. Moreover, currently the excel file would also open into the same spreadsheet too. This is because we do not use “Display as icon” feature as in the case with MS Excel. We will check the feasibility of this feature and get back to you soon.
but when i set sheet.OleObjects(0).FileType = OleFileType.Xls the embedded object message ‘Cannot start the source application for this object’ when double clicked.
I don’t find this problem using the latest version’s dll “Aspose.Cells.dll”.
I tested the ObjectData FileType and it is returning ‘Unknown’.
I don’t find this problem too, the ole object’s file type is Xls if we set it as: sheet.OleObjects(0).FileType = OleFileType.Xls in the code.
Also is there a way to set a caption with the embedded image?
You can use sheet.OleObjects.Name property to set the caption.