Office 365 Excel dynamic arrays support?

331 views
Skip to first unread message

Jason Blair

unread,
Sep 30, 2022, 4:21:21 AM9/30/22
to openpyxl-users
Hello,
I am wondering if there is anything in the planning to support the new Excel features currently included in Office 365 version of Excel, specifically dynamic array support.

I have an .xlsx file which includes dynamic array functions, for example:
=FILTER(FILTER(INDIRECT(B2);(INDIRECT(B3)=1)*(INDIRECT(B4)<>""));(Data!A1:T1="Date")+(Data!A1:T1=C1))
which returns two columns of values, but when opened and then saved with openpyxl, the function is wrapped in curly braces like so:
{=FILTER(FILTER(INDIRECT(B2);(INDIRECT(B3)=1)*(INDIRECT(B4)<>""));(Data!A1:T1="Date")+(Data!A1:T1=C1))}
which is the old excel way of indicating a control+shift+enter (CSE) array.
Adding these curly braces breaks my workbook.

Is there a plan for support of the new dynamic arrays or, is there currently a way to prevent the addition of the curly braces when I open the workbook in openpyxl?

Thank you for your attention,
Jason
Message has been deleted
Message has been deleted
Message has been deleted

张衡

unread,
Oct 1, 2022, 6:25:58 PM10/1/22
to openpyxl-users
Hello, about curly braces, you need to check which version of Microsoft office is installed on your.

Because I don't often go to the forum in China, if you want to discuss this issue in depth, please leave a message by email. My email is: zh13...@outlook.com

Charlie Clark

unread,
Oct 2, 2022, 7:13:10 AM10/2/22
to 'Jason Blair' via openpyxl-users

On 30 Sep 2022, at 10:21, 'Jason Blair' via openpyxl-users wrote:

Hello,

I am wondering if there is anything in the planning to support the new

Excel features currently included in Office 365 version of Excel,

specifically dynamic array support.

Any particular version of MS Excel is not a target for the library but anything that can be done in OOXML can probably done with Openpyxl, though some things may require additional development.

I have an .xlsx file which includes dynamic array functions, for example:

=FILTER(FILTER(INDIRECT(B2);(INDIRECT(B3)=1)*(INDIRECT(B4)<>""));(Data!A1:T1="Date")+(Data!A1:T1=C1))

which returns two columns of values, but when opened and then saved with

openpyxl, the function is wrapped in curly braces like so:

{=FILTER(FILTER(INDIRECT(B2);(INDIRECT(B3)=1)*(INDIRECT(B4)<>""));(Data!A1:T1="Date")+(Data!A1:T1=C1))}

which is the old excel way of indicating a control+shift+enter (CSE) array.

Adding these curly braces breaks my workbook.

Is there a plan for support of the new dynamic arrays or, is there

currently a way to prevent the addition of the curly braces when I open the

workbook in openpyxl?

The curly brackets are one of the annoying red herrings in the GUI. You need to be prepared to look at the source XML to see what's actually going on, including formula prefixes if necessary.

Openpyxl has traditionally had minimal support for shared formulae and, by extension, array formulae through a rather clumsy ws.formula_attributes dictionary. This is changing in 3.1 which makes array and data table formulae first class objects, though to be honest, these are too cumbersome to create manually so the aim is preserve them in existing files and they are editable.

Charlie

--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Waldlehne 23
Düsseldorf
D- 40489
Mobile: +49-178-782-6226

Jason Blair

unread,
Oct 3, 2022, 2:53:58 AM10/3/22
to openpyxl-users
Thank you for this quick response.  Not what I was hoping to hear, but I appreciate you taking time to answer.

Cheers,
Jason

Reply all
Reply to author
Forward
0 new messages