Given: an excel file with PowerQuery queries. Some queries have checked option "Background query" and (for some reason) refresh operation for those queries wasn't completed (was cancelled?).
Goal: find out those queries with uncompleted refresh, like the one below:
I use .NET
Excel API to access Excel process.
Currently, I've found 3 objects of Workbook, that I'm digging into in search for solution:
workbook.Queries
returns collection of WorkbookQuery objects.
workbook.Connections
returns collection of heterogenous object. I filter only objects of type WorkbookConnection
, since that's only what I'm interested in.
workbook.Worksheets[i].ListObjects[j].QueryTable
I've examine them, but have not yet found anything that corresponds to desired "status" message one could see in the UI in the screenshot above.
Any ideas?
question from:
https://stackoverflow.com/questions/65892151/how-to-check-in-vba-net-api-if-power-query-data-refresh-is-completed 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…