MCPcopy
hub / github.com/simstudioai/sim / truncateCell

Method truncateCell

apps/sim/lib/file-parsers/xlsx-parser.ts:194–207  ·  view source on GitHub ↗
(cell: any)

Source from the content-addressed store, hash-verified

192 }
193
194 private truncateCell(cell: any): string {
195 if (cell === null || cell === undefined) {
196 return ''
197 }
198
199 let cellStr = String(cell)
200
201 // Truncate very long cells
202 if (cellStr.length > CONFIG.MAX_CELL_LENGTH) {
203 cellStr = `${cellStr.substring(0, CONFIG.MAX_CELL_LENGTH)}...`
204 }
205
206 return sanitizeTextForUTF8(cellStr)
207 }
208}

Callers 1

processWorkbookMethod · 0.95

Calls 1

sanitizeTextForUTF8Function · 0.90

Tested by

no test coverage detected