jQuery spreadsheet supports headless javascript workbook which can be manipulated with familiar javascript API on the fly.

js workbook can be directly imported into the grid ( as in this example ) or exported to xlsx file.

This example also demonstrates SUMIF function,