From e5239086f237757a4629f435ebd06cf76b1afb6d Mon Sep 17 00:00:00 2001 From: adam-saland Date: Tue, 23 Jan 2024 12:29:07 -0500 Subject: [PATCH] fix selected sheet logic --- how-to/integration-excel/client/src/excel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/integration-excel/client/src/excel.ts b/how-to/integration-excel/client/src/excel.ts index 4e136d79..349defe0 100644 --- a/how-to/integration-excel/client/src/excel.ts +++ b/how-to/integration-excel/client/src/excel.ts @@ -255,7 +255,7 @@ async function populateWorksheets(): Promise { * @param name The name of worksheet to select. */ async function selectWorksheet(name: string): Promise { - if (openWorksheets && selectedWorksheetIndex === undefined) { + if (openWorksheets) { const newWorksheetIndex = openWorksheets.findIndex((w) => w.name === name); if (newWorksheetIndex !== selectedWorksheetIndex) {