MS Excel prompts message to save changes when closing the file (having formulas in it)

I created an excel file using Smart Markers. When I open and then close it, Excel keeps asking to save even though I haven’t changed anything. I have used Smart Markers for a while now. I have never had this issue before. The only thing I did differently this time was I had set a few formulas like so:

 cell.Formula = string.Format($"=SUM({c1}:{c2})");

Does the prompt have something to do with the formula setting? How can I get rid of the prompts?

Thank you!

@sanshi,

This is MS Excel’s behavior and nothing much to do with Aspose.Cells APIs. Such prompt message by MS Excel occured on closing the file if there are formula(s) in the worksheet(s).

This message won’t impact anything so you may ignore it.

Hi Amjad Sahi, thank you for the reply. Is there any API to clear the dirty flag so Excel won’t prompt?

Thanks again!

@sanshi,

Currently there is not way or workaround to cope with it, so you just need to ignore this info message.
Also, we have logged an investigation ticket with an id “CELLSNET-48428” for your issue. The issue is logged as following:
CELLSNET-48428 - MS Excel prompts message to save changes when closing the output file (having formulas in it) by Aspose.Cells.

We will look into it soon.

Once we have an update on it, we will let you know.

1 Like

@sanshi,
We have further analyzed this issue and observed that it is not a bug. You can just sort it out by calling workbook.CalculateFormula(); before saving the file. Please give it a try and share the feedback.

Actually I tried the API before I posted. It didn’t help me. I still got the prompt. Now I just removed all formulas, and replaced them with some Smart Markers. Thanks for the reply.

@sanshi,
You are welcome. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.