We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Formatting not applied to ejSpreadsheet

Hi
When loading the ejSpreadsheet control with JSON based on an excel file (file attached) other than the bold font, none of the other two formats get applied (different colour font and background cell colour).
We're loading the control via thexlObj.loadFromJSON(JSON.parse(response.Content)); method.
On the server, we are opening the xlsx file and then using theSpreadsheet.Open(importRequest); to convert it to the necessary JSON.
Any ideas?
The JSON packet ends up looking like this:
{"dataContainer":{"cellType":["string","number","day","formula","time","longdate","shortdate","scientific","fraction","text","general","accounting","currency","percentage","date","datetime"],"sharedData":["TRUE","FALSE","Hi","Damien","Turnbull"],"sheets":{"1":{"0":{"0":{"value":2,"value2":2,"format":18,"formats":18}},"1":{"0":{"value":3,"value2":3,"format":19,"formats":19}},"2":{"0":{"value":4,"value2":4,"format":20,"formats":20}}}},"hashCode":["e-format6N6N2N111N1N1N1N1N","e-formatFFC7CE82012A71N111N1N1N1N1N","e-formatC6EED20A704371N111N1N1N1N1N","e-formatFEEC9B82671771N111N1N1N1N1N","e-format6N6N71N111N1N1N1N2","e-format6N6N71N181N1N1N1N1N","e-formatDDE5F66N71N111N1N1N1N1N","e-formatFDE0D26N71N111N1N1N1N1N","e-formatEEEEEC6N71N111N1N1N1N1N","e-formatFEF4CD6N71N111N1N1N1N1N","e-format9CC0E76N71N111N1N1N1N1N","e-formatF9AD7B6N71N111N1N1N1N1N","e-formatC9C9C96N71N111N1N1N1N1N","e-formatFED9656N71N111N1N1N1N1N","e-format559AD9FFFFFF71N111N1N1N1N1N","e-formatEB7E2FFFFFFF71N111N1N1N1N1N","e-formatA5A5A5FFFFFF71N111N1N1N1N1N","e-formatFDBF01FFFFFF71N111N1N1N1N1N","e-format6NFF00002N2N1N1N1N1N1N1N","e-format00B0506N2N2N1N1N1N1N1N1N","e-format6N6N2N2N1N1N1N1N2N1N"],"valData":[],"cFormatData":[],"sheetCellType":{},"customCellStyle":{}},"model":{"sheets":[{},{"_activeCell":{"rowIndex":2},"_endCell":{"rowIndex":2},"_startCell":{"rowIndex":2},"colCount":1,"columnsWidthCollection":[64],"rowsHeightCollection":[20,20,20],"rowCount":3,"usedRange":{"rowIndex":2},"sheetInfo":{"text":"Sheet1"},"shapeMngr":{"picture":{},"sharedPics":[],"chart":{}},"pivotMngr":{"pivot":{}}}]}}

Attachment: IN_COR_cdcaf0d3.zip

3 Replies

SI Silambarasan I Syncfusion Team December 7, 2018 09:49 AM UTC

Hi Damien,

Thank you for contacting Syncfusion support.

We have checked your reported issue with the attached excel file by import it in Spreadsheet and the formats are loaded & imported properly in our end. Please refer the below output screenshot.


Moreover, we have checked your provided JSON data by load it using 'loadFromJSON()' method and it's also imported properly with the same font and background cell color in our end. For your convenience, we have prepared a sample to demonstrate this in JSPlayground.
http://jsplayground.syncfusion.com/uol2ikcp 

Meanwhile, we would like to know the following details.

1. Please confirm whether you're facing this issue in specific browser or in all browsers.

2. Did you perform any functionality after importing this excel in Spreadsheet such as in loadComplete event, in AJAX success event,.?

3. Please provide your application details & the way of rendering Spreadsheet in your application.

4. Please provide your Essential Studio product version details that you are currently using.

5. If possible, please share an issue reproducible sample.

Could you please get back to us with the above information so that we can analyze based on that and provide you a better solution? The information provided would be a great help for us to resolve your issue.

Regards,
Silambarasan 



IT infrastructure Team December 10, 2018 05:15 AM UTC

Thanks a lot for your help.

Turns out it was to do with where we had the css file placed in the page. Am not sure why exactly, but it needed to be up in the styles section of the MVC page to work correctly.


SI Silambarasan I Syncfusion Team December 10, 2018 07:07 AM UTC

Hi Damien, 
 
Most welcome. We are happy to hear that your issue has been resolved. 
Please get back to us if you need any further assistance. 
 
Regards, 
Silambarasan. 


Loader.
Live Chat Icon For mobile
Up arrow icon