I'm generating spreadsheets server-side, and with the Kendo spreadsheet now available, would like to make those visible in the browser rather than having the client download the file. The spreadsheets are being created by the open source EPPlus library. I'm not having difficulty showing the spreadsheet, but it's displaying incorrectly.
When doing a server-side import, the number formatting in the cells is lost during the ToJson call back to the client. This can be seen in the Server Import/Export Demo as well. The correct numeric values are present, but their display is wrong.
I'm sending the data back to the server with
public ActionResult GetSpreadsheet(string fname)
{
Stream stream = ReportsController.GetStreamFromCache(fname);
if (stream != null)
{
Workbook workbook = Workbook.Load(stream, Path.GetExtension(fname));
return Content(workbook.ToJson(), MimeTypes.JSON);
}
return new EmptyResult();
}
I've attached a spreadsheet that is showing the problem. It displays correctly in Excel on opening.Oddly enough, I haven't seen anyone mention this on the forums, so I'm wondering if it's something with my spreadsheets.Ideally, I'd use the Workbook object on the server to create the spreadsheets, but we have entirely too many already written to convert.
Thanks for any help you can give.