Skip to content

The API you are trying to use cannot be found error returned when any of the Query class methods are called on getQueries #760

@jasonfirkus

Description

@jasonfirkus

All of the Query class methods do not work with the workbook.getQueries() method; however, these methods all seem to work on an individual Query object returned by workbook.getQuery("name")


To reproduce:
function main(workbook: ExcelScript.Workbook) {
	const queries = workbook.getQueries();
	queries.forEach((query: ExcelScript.Query) => {
		console.log(query.getName()); //replace with any Query class method
	});
}

Errors returned in console:
image
image
image


Working methods when called on `getQuery()`:
function main(workbook: ExcelScript.Workbook) {
	const query = workbook.getQuery("MASTERFORECAST");
	console.log(query.getLoadedToDataModel());
}

Output:
image
image

Metadata

Metadata

Labels

Needs: attention 👋Waiting on Microsoft to provide feedbackStatus: in backlogIssue is being tracked in the backlog but timeline for resolution is unknownType: product bugBug in the Office Scripts platform or Office Scripts APIs

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions