Does anyone know how to Download oj-table data to csv in oracle JET. I have oj-table populated with data source. now i want to provide a button to download this data to csv.
Asked
Active
Viewed 1,453 times
2 Answers
0
EDIT: Just realized you might have been asking for an inbuilt method from OJET to download as csv - OJET doesn't have any. It only has a component for uploading files: http://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=filePicker&demo=basic
Is the datasource an observableArray? If yes, you can convert it to a normal array like this:
var a = ko.observableArray();
var normalArray = a();
Is the datasource an ojCollection? If yes, convert it to a normal array like this:
var a = new oj.Collection();
var normalArray = a.toJSON();
After that you can follow the steps mentioned here.

Ray
- 3,864
- 7
- 24
- 36