MCPcopy
hub / github.com/exceljs/exceljs / getWorksheet

Method getWorksheet

lib/doc/workbook.js:107–118  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

105 }
106
107 getWorksheet(id) {
108 if (id === undefined) {
109 return this._worksheets.find(Boolean);
110 }
111 if (typeof id === 'number') {
112 return this._worksheets[id];
113 }
114 if (typeof id === 'string') {
115 return this._worksheets.find(worksheet => worksheet && worksheet.name === id);
116 }
117 return undefined;
118 }
119
120 get worksheets() {
121 // return a clone of _worksheets

Callers 15

removeWorksheetMethod · 0.95
writeMethod · 0.45
testBookIn.jsFile · 0.45
testBigBookIn.jsFile · 0.45
testCsvIn.jsFile · 0.45
testProcess.jsFile · 0.45
testImageIn.jsFile · 0.45
testBookIn.jsFile · 0.45
exceljs.spec.jsFile · 0.45
app.jsFile · 0.45
gold.spec.jsFile · 0.45
worksheet.spec.jsFile · 0.45

Calls 1

findMethod · 0.80

Tested by

no test coverage detected