Excel doesn't recalculate after using XLSX package

Hello, my problem is as follows:
Having a excel file, which does something with the data, for example in figure 1.

With XLSX, I rewrite the numbers n1 and n2, code in figure 2.

The result of the excel formula doesn’t change, as can be seen in figure 3.

Pressing F9 to recalculate doesn’t do anything, I have to enter the formula bar and click into it to
recalculate it, like in figure 4.

I have rather large excel file with many calculations, doing it by hand is not possible.
I am aware of the option to do the calculation in Julia, but I’d prefer having the excel show
what is happening, and Excel is required.

Am I just stupid? Can I force recalculation somehow?

Here is how to refresh calculations as a hotkey in Excel. Does that help?

Unfortunately not

Using CTR+ALT+F9 does work.

Oh, that works. Is there perhaps a way to force recalculation with Julia?

1 Like

Suggest you try saving the Excel file with automatic calculation activated. See more details here.

Did you ever find a solution to this issue? I’m facing the same problem. I also rewrote my program in R using the XLConnect library to read/write to Excel, and that seems to work as I intended; that is, when new values are inserted into the Excel file through the API, dependent cells recalculate while the file is closed, and I can read the updated calculated values back out to R. I cannot find how to perform the analogous behavior in Julia/XLSX.

No I didn’t. If I need to use the product I would calculate in excel, I do the calculation also in Julia and then, after finishing the calculation, I do ctrl-alt-f9.

1 Like