The Workbook.FromDocument() method freezes the panes based on the coordinates of the TopLeftCellIndex of the pane instead of the XSplit and YSplit properties of the pane. Reproduced with the attached Excel file
var pane = documentWorksheet.ViewState.Pane;
if (pane != null && pane.State == PaneState.Frozen)
{
sheet.FrozenRows = pane.TopLeftCellIndex.RowIndex;
sheet.FrozenColumns = pane.TopLeftCellIndex.ColumnIndex;
}
Solution:
var pane = documentWorksheet.ViewState.Pane;
if (pane != null && pane.State == PaneState.Frozen)
{
sheet.FrozenRows = pane.YSplit;
sheet.FrozenColumns = pane.XSplit;
}
WORKAROUND: Loading the Excel file with DocumentProcessingLibrary API and change the pane
var fileName = <YourFilePathHere...>;
if (!File.Exists(fileName))
{
throw new FileNotFoundException(String.Format("File {0} was not found!", fileName));
}
Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();
using (Stream input = new FileStream(fileName, FileMode.Open))
{
workbook = formatProvider.Import(input);
foreach (var sheet in workbook.Worksheets)
{
if (sheet.ViewState.Pane != null && sheet.ViewState.Pane.State == Telerik.Windows.Documents.Spreadsheet.Model.PaneState.Frozen)
{
var originalPane = sheet.ViewState.Pane;
var pane = new Pane(new CellIndex(originalPane.YSplit, originalPane.XSplit), originalPane.XSplit, originalPane.YSplit, originalPane.ActivePane);
sheet.ViewState.Pane = pane;
}
}
}
var sheets = Telerik.Web.Spreadsheet.Workbook.FromDocument(workbook).Sheets;
The Date is displayed as "12/31/0"
The Date should be displayed correctly.
This is a regression introduced in R2 2019.
Textboxes and charts currently are not supported in the Spreadsheet, however, if the loaded excel file contains such, saving the file should not throw a js exception.
On saving the file the following exception is thrown:
kendo.all.js:12938 Uncaught TypeError: Cannot read property 'target' of undefined
No js exceptions on saving the file.
Calling insertRow multiple times over many sheet data causes a slower performance since 2020.1.219.
http://dojo.telerik.com/EBEtaFOj (2020.1.114)
If there is a Spreadsheet on a given page and we scroll the page down using the mouse wheel, once the scrolling stops over the Spreadsheet and we try to continue it, we cannot do it. If the Spreadsheet has defined rows that are not currently visible when the mouse wheel is moved, then Spreadsheet is being scrolled, not the current page.
If the Spreadsheet has a lower number of pre-defined rows that are all displayed on the component's initialization the scrolling is again not applying to the page. Instead, moving the mouse wheel doesn't do anything until the mouse cursor is moved outside the Spreadsheet.
Because the cursor is inside the Spreadsheet the page cannot be scrolled. If the rows configuration is commented, when the scrolling is started again, the Spreadsheet data will be scrolled.
If all the data in the Spreadsheet is displayed, moving the mouse wheel over the component should result in page scrolling. If there is data in the Spreadsheet, there should be some way to prevent the scrolling inside the component.
Hi Team,
I am using a kendospreadsheet. I want to find the rownumber of last non blank cell for column C.
When i try the =SUMPRODUCT(MAX(($C$1:$C100<>"")*(ROW($C$1:$C100)))) in excel it works.
The same formula does not work in kendospreadsheet.
Please suggest if this is a bug or if formula needs any change to fit the kendospreadsheet.
Regards
Bharathy B
Hi,
I have identified a discrepancy in behavior of Telerik Spreadsheet vs Excel in treatment of array formulae (multiplication of arrays)
The spreadsheet attached contains two examples on how the difference on how Excel and Kendo spreadsheets handle array formulas is impacting the tool I'm developing.
The first example is a simple multiplication between a one-column range and a two-column range. Since both have the same number of Rows, Excel multiples both columns of Array 2 by the Array 1 and sum them
Kendo instead expects both ranges to have the same dimensions, so the same array formula throws an error when opened on Kendo
The second example is a the sum of a multiplication between two same-sized matrixes, but conditioned to a flag array. If the flag for that row is true, then the multiplication of the elements of that row should be added to the final result. On Excel, it works as expected.
On the other hand, Kendo seems to consider the “Flag” matrix as a 2-column matrix with the second column left blank, so the result is the multiplication of the first column of array 1 by the first column of array two, conditioned by the flag array:
You can check the results uploading the attached spreadsheet to the Demo available online: https://demos.telerik.com/kendo-ui/spreadsheet/index
Please let me know your feedback and when/if we can expect an alignment of Spreadsheet behavior to Excel's
Kind regards
Andrea
When using the URL feature of the spreadsheet it seems to use "_blank" as the target (opens in a new window).
My spreadsheet is in a single page application with some javascript already loaded.
I'd like to have the url be something like "javascript:myfunction('test');" which works well even with an a tag "<a href='javascript...'>"
I do this quite a lot with templates on the Grid control.
Not asking for templates on the spreadsheet, just let us specify the target and/or use local javascript functions in an "a href";
Hello,
I've been reading through the documentation, and I wanted to reach out in case I am missing something. In all the Kendo Spreadsheet documentation that is available, I've not seen an MVVM example provided. Is the MVVM method available with use for the Spreadsheet widget? I was also wondering if just syntactically I might not have the right items configured in order for the data to populate in the spreadsheet. I can confirm at the viewmodel that my data is populated in that object, but I just can't seem to get the data to appear in the spreadsheet. Any guidance or additional documentation would be most helpful.
I am setting the data-role="spreadsheet", mimicking other examples of mvvm that I've seen. I've also set the data-bind to my dataSource (data-bind="source:spreadsheetDataSource" while also populating a dataSource object within my data-sheets property. I wanted to verify that these are in fact supported before I continue down this road. I would also like to understand which properties are required by default (data-columns, data-rows, data-sheets) etc...and the properties that exist within the arrays (such as data-sheets), since that also doesn't seem to be present in the documentation.
I'd also like to point out that I am using a windows server 2016, since that option was not listed in the fields below for the ticket. The .NET Framework is 4.5.2
I appreciate all assistance in this matter.
We are looking to see whether all the cells in the formula are filled or not for that we need all the cells information in the formula.
Is there any way to get list of cells present in formula cell.
Hello,
I am looking at possibility to convert Spreadsheet tables to html . I am creating an HTML report with header and footer and would like to merge the spreadsheet table as html between header and footer.
Is there a way to convert the spread content to html tables
Thanks
Anamika
Hello,
we have a hard time controlling the cells "Enable" attribute in a data binding scenario, because it really depends on the data, e.g. the complete Row must be read only (Enable = false) when Cell "Completed" is marked with true.
I mark this as "Feature request" because I think there is no such functionality, but I'd need some dynamic expression here, you could reuse the validation expressions, e.g.:
enable: "NOT(ISERROR(FIND(\"true\", B3)))"
As an alternative/workaround, maybe we can reuse validation / reject, so instead of making the cell non-editable, leave it editable but reject any kind of change, this is just a thought and I feel like there is no easy way to do it like this either.
You might wonder how we apply validation or enabled/disabled cells in data binding scenario; We basically run post processes after data binding, so because I think there is no other way doing it.
Best regards