Posted 11 April 2018, 4:20 am EST
How to save flexsheet data with cells style for example change font style on sheet save data with style.
Forums Home / Wijmo / General Discussion
Posted by: batuchral_96 on 11 April 2018, 4:20 am EST
Posted 11 April 2018, 4:20 am EST
How to save flexsheet data with cells style for example change font style on sheet save data with style.
Posted 12 April 2018, 10:11 am EST
Hi,
To save style with data you need to apply the style using applyCellsStyle() method.
Read more about applyCellsStyle() method here :-
http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.grid.sheet.FlexSheet.Class.html#applyCellsStyle
Here is an example of the same:- https://stackblitz.com/edit/angular-f3cfxj
~nilay
Posted 12 April 2018, 9:37 pm EST
Hi,Nilay
Thank you for responding. I mean how to save flexsheet on server, is there any way to convert flexsheet to json or xml file with style and data.
Bat-Uchral
Posted 13 April 2018, 2:38 am EST
There isn’t a direct method to directly convert sheet’s cell data into JSON with style.
But you can get the style of cells(only applied using applyCellsStyle() method) via sheet’s _styledCells property.
So you can define a getJsonData() method via iterating over cells.
Please refer to the following updated example that does the same:- https://stackblitz.com/edit/angular-cslotc?file=app/app.component.ts
Posted 14 September 2018, 1:09 pm EST
This helped me