Question about CalcProperties and circular references

67 views
Skip to first unread message

Iulia Gheorghita

unread,
Jul 19, 2022, 4:57:37 PM7/19/22
to openpyxl-users
Hi!

Could someone explain to me (or point me to some documentation) on what the attributes of CalcProperties are tracking and where they are pulled from. I'm wondering specifically about iterate, iterateCount, and iterateDelta. 

I'm curious about this because I'm working with the pycel library and it appears they're using the iterate attribute to detect if the workbook has circular references that need evaluation. 

I have an Excel file that I don't believe has circular references, but iterate=True when I inspect the workbook, so I'm likely misunderstanding something. 

Thanks!

Best,
Iulia

Charlie Clark

unread,
Jul 20, 2022, 4:45:45 AM7/20/22
to openpyxl-users
Openpyxl doesn't do anything with this, just exposes it to Python.

You're best looking at the specification:

18.2.2 calcPr (Calculation Properties)
This element defines the collection of properties the application uses to record calculation status and details. Calculation is the process of computing formulas and then displaying the results as values in the cells that contain the formulas.

--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Sengelsweg 34
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226

Iulia Gheorghita

unread,
Jul 20, 2022, 12:38:42 PM7/20/22
to openpyx...@googlegroups.com
Got it, thanks for the quick response. 

One more small question - I'm using Excel version 16.63 on Mac and I have a simple spreadsheet with a basic circular formula. I turned on iterative calculation and "Maximum iterations" is set to the default of 100 and "Maximum change" is set to the default of 0.001. Yet when I read the spreadsheet into an openpyxl workbook, iterate=True but iterateCount and iterateDelta are both None, instead of these defaults. Is this purely an Excel issue? Are these defaults saved in a different location?

Thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "openpyxl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpyxl-users/TL_HIbj9T-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpyxl-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpyxl-users/121F5883-FEA7-4239-B2BB-B324893A3311%40clark-consulting.eu.

Charlie Clark

unread,
Jul 20, 2022, 1:10:08 PM7/20/22
to openpyx...@googlegroups.com
On 20 Jul 2022, at 18:38, Iulia Gheorghita wrote:

> Got it, thanks for the quick response.
>
> One more small question - I'm using Excel version 16.63 on Mac and I have a
>
> simple spreadsheet with a basic circular formula. I turned on iterative
>
> calculation and "Maximum iterations" is set to the default of 100 and
>
> "Maximum change" is set to the default of 0.001. Yet when I read the
>
> spreadsheet into an openpyxl workbook, iterate=True but iterateCount and
>
> iterateDelta are both None, instead of these defaults. Is this purely an
>
> Excel issue? Are these defaults saved in a different location?

The simple answer: I don't know because I never use them.

A quick look at the source code suggests that everything should be okay. That's where should look for more information.

Charlie
Reply all
Reply to author
Forward
0 new messages