Not able to convert excel with embedded attachments to pdf file. It shows only icons but not the actual attachments in pdf

Hello Team,

We have a need of converting excel files (contained embedded attachments) to pdf file. However, using Aspose we are not able to do so. Below are the required details:

  • Aspose Version: 23.12.0.0
  • OS version on which conversion is happening:
Edition Windows 10 Enterprise
Version 21H2
OS build 19044.2486
Experience Windows Feature Experience Pack 120.2212.4190.0
  • Dot Net framework: .Net Framework 4.8
  • Below is the code we are using:

Workbook workbook = new Workbook(inputFilePath + fileName);
Aspose.Cells.PdfSaveOptions pdfSaveOptions = new Aspose.Cells.PdfSaveOptions
{
OnePagePerSheet = true,
ImageType = ImageFormat.Icon,
EmbedStandardWindowsFonts = true,
ExportDocumentStructure = true,
Compliance = Aspose.Cells.Rendering.PdfCompliance.PdfA1a
};
workbook.Save(outputFilePath + Path.GetFileName(fileName) + “.pdf”, pdfSaveOptions);

However, when the excel file is being converted to pdf, the embedded attachments are not exported properly and it shows only icons. I am attaching the excel file and converted pdf file for your reference.

Please have a look into this issue and share your views.
Excel_Sample.zip (701.5 KB)

Please let me know in case of any queries. Waiting for your response.

Thanks.

@lpappachen
Aspose.Cells follow the specifications and rules of MS-Excel. If you open the file in Excel and preview it for printing, you will get the same result. Please check the attachment. result.png (29.5 KB)

If you need to export embedded resources to PDF, you need to extract OLE objects in the Workbook and convert them to pdf using corresponding aspose products. About managing OLE Objects, please refer to the following document.

Hello,

We have a similar need to convert word document with embedded files to pdf. When we tried there, it is converting properly and pdf do contain the embedded files. For word document, when we see print preview, it shows same print preview as excel’s print preview but still word to pdf conversion is happening properly.

I have attached the document for word document and below is the code we are using:
Word_Sample.zip (1.8 MB)

Aspose.Words.Document docx = new Aspose.Words.Document(inputFilePAth);
Aspose.Words.Saving.PdfSaveOptions pdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions
{
EmbedAttachments = true,
EmbedFullFonts = true
};
docx.Save(outputFilePath, pdfSaveOptions);

Could you please share the insights on how to achieve the same behavior for excel to pdf conversion too?

Thanks.

@lpappachen
Thanks for your info. We have got your expected results.
We have opened a new ticket CELLSNET-55361 in our internal issue tracking system to look into this feature.

@lpappachen,

We are pleased to inform you that your requested feature (ticket logged as: CELLSNET-55361 - Embed attachments when converting OLE Object to PDF file) has been implemented. The enhancement will be included in our upcoming release (Aspose.Cells v24.4) that we plan to release in the second week of April 2024. You will be notified when the next version is released.

Thank you for the updates.

@lpappachen,

You are welcome.

The issues you have found earlier (filed as CELLSNET-55361) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi