Hi,
There are multiple formats for date and time in kendo and in different cultures the count increases. Is there a function in which i pass spreadsheet cell value and format and it returns that it is a date format or number format. I just want to know the type of format so i can parse the dates on my own from json on server side.
Regards,
Faraz
Hi Faraz,
Thank you for the suggested workaround which properly identifies the type of the current cell format. As per adding a formatType() function to the Spreadsheet Range object API, we will keep the current thread open and monitor the interest among the community.
Regards,
Veselin Tsvetanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Veselin,
I found a hack to do it
el.cells = el.cells.map(o => ({ index: o.index, value: o.value, type: typeof (o.format) == "undefined" ? "" : kendo.spreadsheet.formatting.type(o.value, o.format) }));
But please do add type attribute a cell property so ToJSON is called we can have type of cell.
Regards,
Faraz
Hi Faraz,
The Spreadsheet Range object does not have a dedicated function that would specify a given cell format as a Date or not. Unfortunately, I cannot think of any approach that would allow you to obtain the information needed.
That is why I have converted the current tread to a feature request in our Feedback portal. Here is where you could find the public item on it:
Do not forget to cast your vote for it as that would move the request sooner in our implementation queue.
Regards,
Veselin Tsvetanov
Progress Telerik