We have had a spreadsheet popup working for a "quick edit" solution for a few years. I just upgraded to 2020.2.617 and the spreadsheet is no longer calculating correctly. If I turn the formula row on the top, it looks like the formulas are not there. What changed between 2017 SP1 and this release? What do I need to do differently?
Here is an example of the spreadsheet (cshtml)":
@(Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.HtmlAttributes(new { style = "width:98%; height: 90%;" }).HeaderHeight(0).HeaderWidth(0)
.Toolbar(false)
.Sheetsbar(false)
.Excel(excel => excel
.ProxyURL(Url.Action("Index_Save", "Spreadsheet"))
)
.Pdf(pdf => pdf
.ProxyURL(Url.Action("Index_Save", "Spreadsheet"))
)
.Events(events => events
.Render("onRenderExpenses"))
.Sheets(sheets =>
{
sheets.Add()
.Name("Transactions")
.Columns(columns =>
{
if (Model.SpreadSheetColumns != null)
{
foreach (SpreadSheetColumnSettings col in Model.SpreadSheetColumns)
{
columns.Add().Width(col.Width);
}
}
})
.Rows(rows =>
{
rows.Add().Index(0).Height(60).Cells(cells =>
{
if (Model.SpreadSheetColumns != null)
{
foreach (SpreadSheetColumnSettings col in Model.SpreadSheetColumns)
{
cells.Add().Bold(true).TextAlign(SpreadsheetTextAlign.Center)
.Value(col.Title).Background("#80cce7").Color("#000000").Wrap(true)
.Enable(false);
}
}
});
rows.Add().Index(99).Height(40).Cells(cells =>
{
foreach (SpreadSheetColumnSettings col in Model.SpreadSheetColumns)
{
cells.Add().Bold(true).TextAlign(SpreadsheetTextAlign.Right)
.Background("rgb(193,226,255)").Color("#000000")
.Enable(false).Format(col.Format).Formula(col.Formula);
}
});
});
})
)
And here is an example of the columns:
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
, Formula =
"IF(ROUND(SUM(H"
+ rowTotal +
":I"
+ rowTotal +
"),2) - ROUND(SUM(K"
+ rowTotal +
":BG"
+ rowTotal +
"),2) = 0,0,1)"
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 100, Editable =
false
, Format =
"$#,##0.00"
, Formula =
"SUM(H2:H"
+ maxRows +
")"
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 100, Editable =
false
, Format =
"$#,##0.00"
, Formula =
"SUM(I2:I"
+ maxRows +
")"
});
//columns
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 30, Editable =
false
});
columnList.Add(
new
SpreadSheetColumnSettings() { Width = 100, Editable =
false
, Format =
"$#,##0.00"
, Formula =
"SUM(K2:K"
+ maxRows +
")"
});