appmaker - Excel/Sheets copy-compatible table widget -


for sake of app's end-users, tried copy data app maker's basic table widget excel , gsheets. however, results in getting data in single column in spreadsheet.

i noticed kind of copying possible using table chart widget. still, need basic table widget's functionalities row click events.

is there way common users easy exporting excel (while using basic table widget)? kind of copying possibility implemented widget (i.e. there sense in making feature request)? other suggestions make data usable in other programs?

thanks in advance!

it unlikely, implemented app maker, since basic table customizable , can contain widget , display model relations well. makes more sense think copying datasource items clipboard or exporting them spreadsheet. here reference code, can try use generate serialized string compatible google spreadsheet datasource:

// onclick event handler 'copy clipboard' button var ds = app.datasources.mydatasource; var items = ds.items; var fields = ds.model.fields._values; var serialized = '';  items.foreach(function(item) {   var values = [];    fields.foreach(function(field) {     var value = item[field.name];     var strval = value === null ? '' : value.tostring();     values.push(strval);   });    serialized += values.join('\t') + '\n'; });  // can find how implement copying clipboard // here: https://stackoverflow.com/questions/400212 copytoclipboard(serialized); 

note: code snippet serialize model fields, if not present in table, not serialize model relations, if there in table. if need subset of model's fields, can specify them explicitly:

... var fieldnames = ['fielda', 'fieldb', ......]; // fieldnames  ...   fieldnames.foreach(function(fieldname) {   var value = item[fieldname]; .... 

to serialize model's relations you'll need put more efforts...


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -