We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel 2007 Forcing Save Prompt

I'm developing an application which generates several Excel files using Aspose.Cells v4.6.0 in Excel2007Xlsx format. Each workbook is created by copying a "template" xlsx file as indicated below:

Dim xlOutput as Aspose.Cells.Workbook = New Aspose.Cells.Workbook
Dim xlOutputTemplate as Aspose.Cells.Workbook
xlOutputTemplate.Open("templatefile.xlsx")
xlOutput.Copy(xlOutputTemplate)
'make changes to xlOutput
xlOutput.Save("createdfile.xlsx",Aspose.Cells.FileFormatType.Excel2007Xlsx)

This part seems to work fine. However, the first time the file generated is opened in Excel 2007, even if no changes are made to the file, when the file is closed, Excel still prompts the user saying, "Do you want to save the changes you made to 'createdfile.xlsx'?" After you save in Excel 2007, if you open the file again and close it you do not receive the same save prompt. I need to find a way to stop the save prompt from appearing.

Any ideas on what is causing it or, more important, how to prevent the save prompt from appearing on the inaugural closing of the document?

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, I have tested your scenario and I am unable to reproduce the issue you have mentioned. Please post your template file and we will check it and figure it out soon.

Thank You & Best Regards,

Hi,

Yes, you are right, please ignore Nausherwan's post. Well, this is just an info type error which is shown if there are formulas in the excel file. We will look into it soon and try to remove it for user's convenience.

Thank you.

For the record, I am doing:

xlOutput.ReCalcOnOpen = False
xlOutput.RecalculateBeforeSave = False

before the xlOutput.Save(...) to try to eliminate any need for Excel 2007 to save.

Is there any time estimate for a solution or work around for this issue?

Hi,

We will update you soon.

Thanks for being patient!

Hi,

Please try the attached version, we have fixed the issue. See the following testing code:

Dim workbook As New Workbook()
workbook.Worksheets(0).Cells("A1").Formula = "=10"
workbook.CalculateFormula()
workbook.ReCalcOnOpen = False
workbook.Save("f:\test\calcformulamessage.xlsx",FileFormatType.Excel2007Xlsx)

Thank you.

The fix worked perfectly. Thank you.