Hi there,
First off, I wanted to say that I really like this new component. However, I've been having a couple of issues with it and was wondering if I was doing something wrong or if those features were not implemented yet as the component is still in beta.
I cannot get the component to work at all when importing it using require.js. It loads all the listed dependencies but when I instantiate it, I get an error in the console saying "s is not a function". If I import kendo.all.min.js instead the component works without any issues but greatly increases load time.
Is it possible to localize the component? I've tried looking into kendo.ui.Spreadsheet.prototype.options.messages but unlike many other components, there is no messages object in the options.
Finally, Is it possible to dynamically resize the component? I know you can set the size before you instantiate by setting a width on the div that will become the spreadsheet however any resizing operation done afterwards breaks the layout.
Thank you
15 Answers, 1 is accepted
Thank you for your interest in Kendo Spreadsheet.
I cannot get the component to work at all when importing it using require.js. It loads all the listed dependencies but when I instantiate it, I get an error in the console saying "s is not a function". If I import kendo.all.min.js instead the component works without any issues but greatly increases load time.
I was able to reproduce the issue and will log it in our internal bug tracker.
Is it possible to localize the component? I've tried looking into kendo.ui.Spreadsheet.prototype.options.messages but unlike many other components, there is no messages object in the options.
The Spreadsheet and its components are designed to be localize-able but currently the messages are not listed in the options configuration object and are not documented. They are also missing from the messages/ files. We will do our best to fix this in next version.
Finally, Is it possible to dynamically resize the component? I know you can set the size before you instantiate by setting a width on the div that will become the spreadsheet however any resizing operation done afterwards breaks the layout.
This should be working. Is the issue reproduce-able at our demo pages or can you provide Dojo test page that isolates it? In this way I will be able to examine the case in details and assist you further.
Regards,
Alexander Valchev
Telerik
Hi Alexander,
I was able to get the dynamical re size working by setting relative sizes instead of setting a pixel size and then resizing it by changing the values.
Thanks for your time.
Can you please describe what elements you are resizing?
I am setting the container and the k-spreadsheet-view, but I am missing another element to get the layout to display correctly.
Cheers,
Kori
0x800a138f - JavaScript runtime error: Unable to get property '_grid' of undefined or null reference.
when loading spreadsheet.
Please open a new thread with example and more details for the issue so we can reproduce it and assist you further.
Regards,
Alexander Valchev
Telerik
hello Alexander,
I am trying to import excel file to kendo spreadsheet.
public ActionResult Upload(HttpPostedFileBase file)
{
var workbook = Workbook.Load(file.InputStream, Path.GetExtension(file.FileName));
return Content(workbook.ToJson(), Telerik.Web.Spreadsheet.MimeTypes.JSON);
}
this function is returning count 27 sheets and everything good.
But when I am trying to write in
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
success: function (e) {
spreadsheet.fromJSON(e.response);
}
I am getting error in
kendo.all.min.js:74
Uncaught TypeError: Cannot read property 'end' of undefined.
Please help me regarding that. why this error is happening and what I need to take action regarding that.
also I spreadsheet is giving error.
$(function () {
//$("#divExcelGrid").hide(1000);
//$("#divExcelGrid").fadeOut("slow");
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var ALLOWED_EXTENSIONS = [".xlsx",".csv", ".txt", ".json"];
$("#upload").kendoUpload({
async: {
saveUrl: UploadActionUrl,
autoUpload: true
},
multiple: false,
localization: {
"select": "Select file to import..."
},
select: function (e) {
var extension = e.files[0].extension.toLowerCase();
if (ALLOWED_EXTENSIONS.indexOf(extension) == -1) {
alert("Please, select a supported file format");
e.preventDefault();
}
},
success: function (e) {
e.response.sheets.splice(10, e.response.sheets.length -1);
spreadsheet.fromJSON(e.response);
//$("#divExcelGrid").show(1000);
//$("#divExcelGrid").fadeIn("slow");
}
});
});
if I am trying to uncomment hide and show part. I am just showing the result slowly but it is giving error.
Regards
Pankaj
Please open a new thread with example and more details for the issue so we can reproduce it and assist you further. This thread was opened by another client for another issue.
Regards,
Alexander Valchev
Telerik
Hi there,
I am using Kendo UI v2015.1.408 in my application. I am trying to use KendoSpreadSheet control and have imported require.js just like the above thread. I am also getting an exception "$(...).kendoSpreadsheet is not a function". When I use your demo sample in simple htm file (without using require.js), I am seeing the spreadsheet. I need to use require.js & kendo.spreadsheet together . Any workaround or option available to resolve this? is it fixed in the latest release? Please reply back with sample. Any help is greatly appreciated.
Regards,
R.Saranya.
I am putting spreedsheet is div . and hide that div on load. and on button click show the div . but spredsheet giving error like _grid is undefined and no rows and column are coming.
even if i put grid in boot strap modelpopup its also giving same error. Please help.
I am also trying to put Kendo spreadsheet UI in kendo window UI ..then it is also giving same error i.e _grid is undefined or null.
here is code . please help.
@(Html.Kendo().Window().Name("Window")
.Modal(false)
.Resizable().Visible(false).Height(450).Width(1120)
.Title("Window")
.Content(
Html.Kendo().Spreadsheet()
.Name("spreadsheet3")
.HtmlAttributes(new { style = "width:100%; margin-top:5px;" })
.ToHtmlString()
)
).Render();
@Pankaj I logged this in Kendo UI Core bug tracker. We will do our best to address the issue as soon as possible, you may follow the issue status here.
@R.Saranya please upgrade the Kendo UI version that you use.
Regards,
Alexander Valchev
Telerik by Progress
Hi Alexander,
What version of Kendo should i need to update to make Kendo SpreadSheet work along with require.js?
Regards,
R.Saranya.
Please try Kendo UI version higher than 2016.1.118.
Regards,
Alexander Valchev
Telerik by Progress
I also get the kendoSpreadsheet() is not a function when I copy and paste your basic example.
I am using 2021.3.1207. Here are my includes (replacing what you had in order)
<link href="~/Content/kendo/2021.3.1207/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2021.3.1207/kendo.default.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2021.3.1207/kendo.default.mobile.min.css" rel="stylesheet" />
<script src="~/Scripts/kendo/2021.3.1207/jquery.min.js"></script>
<script src="~/Scripts/kendo/2021.3.1207/jszip.min.js"></script>
<script src="~/Scripts/kendo/2021.3.1207/kendo.all.min.js"></script>
What am I missing?: TIA.
Stuart at Dorgersoft