Save to pdf goes wrong

I have an Excel document that shows a popup messagebox on opening. With Cells I can get to the data in the document fine, but when I save the document to pdf I’m missing the data (propably because of the popup messagebox). Is there a way to remove or ignore the popup?

@Expansion,
Please share your sample files and code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.

Desktop.zip (23.1 KB)

The entry which is created after the messagebox is closed will be missed when saving to pdf.

Dim FileName As String = “C:\Users\name\Desktop\Book1.xlsm”
Dim ExcelDocument As New Aspose.Cells.Workbook(FileName)

    If ExcelDocument.HasMacro Then
        ExcelDocument.RemoveMacro()
    End If

    FileName = "C:\Users\name\Desktop\Book1.pdf"

    ExcelDocument.Worksheets.First().PageSetup.Orientation = Aspose.Cells.PageOrientationType.Landscape
    ExcelDocument.Save(FileName, Aspose.Cells.SaveFormat.Pdf)

@Expansion,
It seems that you are using some older version as I am not able to reproduce the issue here. After running this sample code, the PDF contains data as expected. You may please give a try to this scenario using the latest version and share the feedback.
Book1.pdf (12.9 KB)

@ahsaniqbalsidiqui

You are also missing the data in the A1 cell. Please open the excel document to see what happens after you close the messagebox.

Capture.PNG (9.5 KB)

@Expansion,
Yes, A1 cell is missing data as it is filled after running the macro. Please note that Aspose.Cells does not support running macros therefore it is not possible to get the desired data using Aspose.Cells.