newChainable - cfsimplicity/spreadsheet-cfml GitHub Wiki
Creates a "chainable" version of the library which doesn't require the workbook currently being operated on to be passed into each call.
newChainable( [ existingWorkbookOrNewWorkbookType ] )
Optional arguments
existingWorkbookOrNewWorkbookTypespreadsheet object OR string default="": An existing spreadsheet object (workbook), or the type of new workbook to create and operate on - possible values "xls", "xlsx", "streamingXlsx".
Note
If you don't pass an existing workbook or specify a new type, you will need to set up the workbook to operate on as the next call in the chain, for example using the .read(), .fromCsv() or .fromQuery() methods.
Example
spreadsheet.newChainable( "xlsx" )
.addRows( data )
.formatRow( { bold: true }, 1 )
.write( filepath, true );