0

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.

65th bit
  • 55
  • 1
  • 11

2 Answers2

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
0

You can use oj-sample-export-data component.

vijin
  • 233
  • 4
  • 14