On Thu, Apr 7, 2016 at 3:54 PM, Darren Strong <darren@xxxxxxxxx> wrote:
Any sheet with a formula, built by typical third-party software,
should trigger Excel to prompt if you want to save changes.
That's what we were trying to fix, by having this third part app (POI)
recalculate the values itself. It doesn't seem to prevent Excel from
recalculating though. I wonder if there is a flag you have to set on the
cell to say that its now been calculated.
Have you been reading any of my posts?
Yes, there absolutely is a flag you have to set. Actually, depending
on defaults, there are probably two. This is what I have been saying
all along.
One is the "calc on load" property. This has to be off.
The other is the "calc ID", which is a kind of internal Excel version
number. This has to be at least as high as the version number of the
Excel program you are using to open the file, but it seems as though
it can safely be set higher. This internal version number is not
something that is readily exposed to the user (you can't just look at
the build number in the help, for example). As far as I know, the only
reliable way to get this number is to save a workbook using the
version of Excel you are targeting, and inspecting the value of the
resulting calc ID. I only have access to Excel 2010, and it has a
6-digit calc ID, so in my experiments I use 999999 to try to make
Excel not bother me about saving changes. (The higher number tells
Excel: "Don't worry, the last recalculation was done by a version of
Excel even later than you.") I don't know if there's some upper limit
beyond which Excel says "hey, now I KNOW you're just pulling my leg"
and goes back to being skeptical of your results.
John Y.