Need a connection of html for cell range in spreadsheet

2 posts, 0 answers
  1. Dhruven
    Dhruven avatar
    19 posts
    Member since:
    Jun 2019

    Posted 12 May Link to this post

    Hi,

    I am working with spreadsheet wrapper for React and I am in need of a connection between cell range and cell's html. 
    For an example, I have "Hello world" in cell "B2". Now I want to get html for that specific cell using sheet.range(1,1) instead of looping through all the cells using document.querySelector('.k-spreadsheet-cell'). 

    Is it possible? If it is then can I get a small example. 

     

    Thank you.

     

     

  2. Stefan
    Admin
    Stefan avatar
    2960 posts

    Posted 13 May Link to this post

    Hello, Dhruven,

    The range has value and values method which are both getters and setters:

    https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/values

    https://docs.telerik.com/kendo-ui/api/javascript/spreadsheet/range/methods/value

    https://stackblitz.com/edit/react-kl69hj?file=app/main.jsx

    If the requirement is to get the DOM element, I can suggest using the selected method, to select the range then only select the cells with class "k-spreadsheet-active-cell".

    Regards,
    Stefan
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top