The core library can be used as-is in AngularJS applications. The SheetJS + AngularJS demo covers common strategies.
This demo shows:
- $http request for XLSX file and scope update with data
- HTML table using ng-repeat
- XLSX table export using `XLSX.utils.json_to_sheet`
- Custom directive for importing user-submitted files
Sample Spreadsheet
The table has hardcoded fields `Name` and `Index`.
Testing
- Load page. The table should show a list of presidents.
- Click "Export Table" and confirm that a file was downloaded.
- Open the generated file in a spreadsheet editor and add a new row.
- Use the file input element to select the edited file. The table should refresh.