async getSheetByTitle(title) { await doc.loadInfo(); // Find sheet by title const sheetIndex = doc.sheetsByIndex.findIndex((i) => i.title === title); if (sheetIndex === -1) { throw { message: 'Sheet not found', }; } const sheet = doc.sheetsByIndex[sheetIndex]; const rows = await sheet.getRows(); return rows; }
(k, v) => spreadSheet.sheetsByIndex[v].title ); worksheet: spreadSheet.sheetsByIndex[sheetsNames.indexOf(title)], formatCell });