# Excel doesn't recalculate after using XLSX package

**URL:** <https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881>\
**Category:** General Usage\
**Tags:** question, xlsx\
**Created:** [November 3, 2021, 2:57pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881 "2021-11-03T14:57:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pahec97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pahec97/32/30473_2.png) [@Pahec97](https://discourse.julialang.org/u/Pahec97)\
**Post date:** [November 3, 2021, 2:57pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/1 "2021-11-03T14:57:41Z")

</div>

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?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/1/8166eded7ad21c2866cc4b1d929360096199a04e.png)

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [November 3, 2021, 3:33pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/2 "2021-11-03T15:33:49Z")

</div>

[Here](https://spreadsheeto.com/recalculate-and-refresh-formulas/) is how to refresh calculations as a hotkey in Excel. Does that help?

---

<div class="post-metadata">

**Author:** ![Pahec97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pahec97/32/30473_2.png) [@Pahec97](https://discourse.julialang.org/u/Pahec97)\
**Post date:** [November 3, 2021, 6:04pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/3 "2021-11-03T18:04:37Z")

</div>

Unfortunately not

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 3, 2021, 10:23pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/4 "2021-11-03T22:23:54Z")

</div>

Using `CTR+ALT+F9` does work.

---

<div class="post-metadata">

**Author:** ![Pahec97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pahec97/32/30473_2.png) [@Pahec97](https://discourse.julialang.org/u/Pahec97)\
**Post date:** [November 4, 2021, 10:02am UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/5 "2021-11-04T10:02:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 4, 2021, 11:16am UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/6 "2021-11-04T11:16:40Z")

</div>

Suggest you try saving the Excel file with automatic calculation activated. See [more details here](https://docs.microsoft.com/en-us/office/troubleshoot/excel/current-mode-of-calculation).

---

<div class="post-metadata">

**Author:** ![robertdbrowniii](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdbrowniii/32/34102_2.png) [@robertdbrowniii](https://discourse.julialang.org/u/robertdbrowniii)\
**Post date:** [February 23, 2022, 9:42pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/7 "2022-02-23T21:42:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pahec97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pahec97/32/30473_2.png) [@Pahec97](https://discourse.julialang.org/u/Pahec97)\
**Post date:** [February 24, 2022, 5:08am UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/8 "2022-02-24T05:08:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.julialang.org/u/TimG)\
**Post date:** [August 29, 2026, 6:25pm UTC](https://discourse.julialang.org/t/excel-doesnt-recalculate-after-using-xlsx-package/70881/9 "2026-08-29T18:25:05Z")

</div>

XLSX.jl now sets the workbook to recalculate automatically when Excel opens it, so this should just work now.
