related to https://github.com/telerik/kendo-ui-core/issues/3519 workaround for rounding function is using Custom Functions http://docs.telerik.com/kendo-ui/controls/data-management/spreadsheet/custom-functions kendo.spreadsheet.defineFunction("ROUND", function (x) { return Math.round(x); }).args([ ["x", "number"] ]); Cell cell = new Cell() { Index = 0, Formula = "=ROUND(1.2)", Bold = true, Background = "#fef0cd", Format = "$0" };
Currently the formatting feature (Bold, Italic and Underline) applies to entire cell content. It will be nice to have a partial cell content formatting feature (including subscript and superscript), means only few characters within the cell can be formatted instead of entire cell content (same as in Excel). Thanks
The default font size on the client is not saved explicitly on the Excel file, so the Excel defaults take over (11px Calibri), so upon subsequent import all cells will have that font.
Steps to repro:
go to https://demos.telerik.com/aspnet-ajax/spreadsheet/examples/import-export/defaultcs.aspx
export the file
import the file
Expected: nothing changes
Actual: all cells are 11px Calibri
Workaround: Set a default font when the cell font is null
public override void SaveWorkbook(Workbook workbook)
{
string path = "C:\\path-to-output.xlsx";
for (int i = 0; i < workbook.Sheets.Count; i++)
{
for (int j = 0; j < workbook.Sheets[i].Rows.Count; j++)
{
for (int l = 0; l < workbook.Sheets[i].Rows[i].Cells.Count; l++)
{
string fontFamily = workbook.Sheets[i].Rows[i].Cells[l].FontFamily;
workbook.Sheets[i].Rows[i].Cells[l].FontFamily = !string.IsNullOrEmpty(fontFamily) ? fontFamily : "Courier New";
double? fontSize = workbook.Sheets[i].Rows[i].Cells[l].FontSize;
workbook.Sheets[i].Rows[i].Cells[l].FontSize = fontSize.HasValue ? fontSize : 12;
}
}
}
workbook.Save(path);
}
Currently, the RadSpreadsheet supports only Dollar as currency. As a temporary workaround, the Kendo UI Spreadsheet (https://demos.telerik.com/kendo-ui/spreadsheet/index) can be used as demonstrated in this Dojo example: https://dojo.telerik.com/imAWasuJ - Select a cell with number as value - Open the formats dropdown - Choose the "More Formats..." option - Select "Currency" tab - Choose a currency from the dropdown - Choose the desired format.
In Internet Explorer version 11.418.18362.0, when hovering over the lower-right dot the cursor doesn't change to the expected cross-hair.
To Reproduce:
1. Open IE11
2. Navigate to the ASP.NET Spreadsheet Demo
3. Highlight a few cells
4. Hover the cursor over the lower-right dot
Expected Behavior:
The cursor changes to a thin cross-hair icon but it doesn't change in IE 11.
I think it might be very useful to add to cell comments a html code and be able to do it programmatically.
Thank you
The RadSpreadsheet server-side object does not support Named Ranges.
Workaround:
Nevertheless, you can load them client-side with the code below, by saving a JSON in a hidden field and loading it via the API:
protected void Page_Init(object sender, EventArgs e)
{
var path = Server.MapPath("~/App_Data/spreadsheet.xlsx");
var workbook = Workbook.Load(path);
HiddenField1.Value = workbook.ToJson();
}
<script>
function pageLoadHandler() {
var spreadsheet = $find("<%= RadSpreadsheet1.ClientID %>");
var hiddenfield = $get("<%= HiddenField1.ClientID %>");
if (hiddenfield.value) {
spreadsheet.get_kendoWidget().fromJSON(JSON.parse(hiddenfield.value))
hiddenfield.value = '';
}
// Sys.Application.remove_load(pageLoadHandler);
}
Sys.Application.add_load(pageLoadHandler);
</script>
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1"></telerik:RadSpreadsheet>
<asp:HiddenField runat="server" ID="HiddenField1" />
Workaround: Placing the following script under the ScriptManager
<script>
kendo.spreadsheet.registerEditor('_validation_list', function () {
var context, list;
function create() {
var $list = $("[id$='SpreadsheetListBoxDropDown']").first();
var element = $list.closest(".rssPopup");
list = $find($list.attr("id"));
if (!this._listdropdown) {
var dropdown = new kendo.spreadsheet.DropDown(element);
this._listdropdown = dropdown;
list.add_selectedIndexChanged(function (sender, args) {
dropdown.close();
var item = list.get_selectedItem();
if (item) {
context.callback(item.get_value());
}
});
}
this._listdropdown.openFor(context.view.element.find('.k-spreadsheet-editor-button'));
}
function open() {
create();
var matrix = context.validation.from.value;
if (matrix) {
var items = list.get_items();
items.clear();
matrix.each(function (el) {
var item = new Telerik.Web.UI.RadListBoxItem();
item.set_text(el);
items.add(item);
});
}
}
return {
edit: function (options) {
context = options;
open();
},
icon: 'p-icon p-i-arrow-60-down'
};
});
</script>
The issue is replicated when the spreadsheet is higher than the screen height. To reproduce it, scroll the page and click the last visible cell.
Result: The page is scrolled to the beginning of the Spreadsheet element
Expected: The page is not scrolled
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1" Height="2000px" Width="100%">
</telerik:RadSpreadsheet>
Link is not clickable when situated in a disabled cell.
Steps to reproduce.
1. Place a link in a cell or a range of cells
2. Disable the cell (range)
3. Click the link
Hello,
The problem is as follows:
Currently, a script solution is required to pre-select a sheet different from the first one.
function pageLoadHandler() {
var spreadsheet = $find("<%= RadSpreadsheet1.ClientID %>").get_kendoWidget();
var sheet = spreadsheet.sheetByName("Sheet1");
spreadsheet.activeSheet(sheet);
// Sys.Application.remove_load(pageLoadHandler);
}
Sys.Application.add_load(pageLoadHandler);
This script could be entirely loaded from the server-side following this article on how to properly register a script from the code-behind:
I have RadSpreadsheet with 5 rows. If I copy 10 rows from Excel into RadSpreadsheet, it will show error message "Cannot paste, because area not the same size".
Is it possible to get RadSpreadsheet to automatically add rows when we paste data? (similar to the Kendo Spreadsheet Widget)
The Spreadsheet control looks fantastic and will help us replace existing functionality, along with building new streamlined user interfaces. Please include the ability to specify individual cells that function as drop-downs, where we could bind the data to an external source and have the user select one of the options.
Please provide the ability to specify splitter type of functionality where several rows could be static while the remainder of the screen would scroll.
I would like to see the ability to add checkboxes to spreadsheet cells. In particular, I would like to check boxes in the top row and/or the right column to select rows or columns and then modify cell values based on the the selected checkboxes.
Can be interesting the power pivot functionality to be supported for spreadsheet control for telerik ui for Ajax.Net.