Open benci042 opened 3 years ago
would you like to change the value?
table.setValue('D1', 'newvalue')
Thanks for your response , I mean how to change cell type by programmatically. for example ,i need to change "D1" with dropdown with existing table.
Sorry, we are going to include a fix for the method. Meanwhile, this would be the best way to change the object properties.
Changing for type text: table.options.cells['D1'].type = 'text';
Changing for type dropdown: table.options.cells['D1'].type = 'dropdown'; table.options.cells['D1'].source = ['Apples','Pears']; // add here the options
Etc.
Noted with thanks.
sorry to interrupt you , when i try put table.options.cells['D1'].type ='text'; I got error message, can't read prperty 'type' of undefined .
If you are setting a new one you should define the whole property: table.options.cells['D1'] = { type:'text' } table.options.cells['D1'] = { type:'dropdown', source:['Apple','Pears'] };
big thanks.
it's working now . and has little problem. The cell not has dropdown symbol . FYI...
We will make sure to include a method to do that automatically, for now: table.records[0][0].element.classList.add('jexcel_dropdown'); // 0,0 means A1 where y,x table.records[0][3].element.classList.add('jexcel_dropdown'); // 0,3 means D1 where y,x table.records[1][4].element.classList.add('jexcel_dropdown'); // 1,4 means E2 where y,x
Regards,
Hi Paul I'm using pro version, special cell can be using init data to build jexcel. like this https://jexcel.net/v5/cases/payment-calculator
and now i has new issule ,how to change it by programmatically? i can using getcells return it . and got error msg "cellName is not defined" when i using setcell .like this table.setCells('D1',object) . thanks.