Context
I use xlsxwriter to write some data into an xlsx file from a python code.
I need to fill a cell with a formula that calculates the average of a specific column (that contains time values).
Problem Description
I noticed that when I try to open my document with Excel, it automatically adds an '@' symbol right before my range which makes my formula calculation fail...
If I manually remove this extra '@', the formula works perfectly as expected.
It is really annoying to have to manually fix my formula like that since I have a lot of similar average calculations that are broken because of this.
I read that it is Excel that adds it so it seems to be no way to prevent this undesired behaviour programmatically from my python code with the xlsxwriter API.
Question
Does someone know if there is a way to prevent Excel to perform any modification of my formulas ?
What I have tried so far
I already tried to "protect" all of my sheets (make them read-only) but it seems to apply only for the user, not for Excel...
Example
Here is an example of my issue (to make it more understandable that this load of plain text).
From my python code, if I write the following formula:
=AVERAGE(TIMEVALUE(B2:B8))
After opening the document, Excel automatically changes the formula as:
=AVERAGE(TIMEVALUE(@B2:B8))
Which make the result of the calculation become:
#VALUE!
If I undo what Excel does by manually restoring my formula (manually edit the cell and remove the '@'), I get the desired calculated average value as I expected it to be.