Version

Read an Excel 2007 XLSX File Into a Workbook

In addition to writing out Microsoft® Excel® files, the JavaScript Excel Library can also read them. When an Excel file is read with the static load method, a Workbook object is created and its entire object model is populated with all supported information from the file.

If you are loading a workbook of a particular format and you would like to save it as another format, you can use the setCurrentFormat method of the Infragistics.Documents.Excel.Workbook object. Also, the currentFormat property can be used to get the current workbook format.

The following code demonstrates how to read in an existing XLSX workbook, make a change, and write the workbook to a new file:

In JavaScript:

var workbook = $.ig.excel.Workbook.load(fileData);

workbook.worksheets(0).rows(0).cells(0).value(19);
workbook.save(function(data) { 
  },
  function(error) {
  });

View on GitHub