We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to read and set data in ejSpreadSheet

Thread ID:

Created:

Updated:

Platform:

Replies:

121818 Jan 28,2016 09:34 AM UTC Jan 29,2016 11:24 AM UTC JavaScript 1
loading
Tags: ejSpreadSheet
fm
Asked On January 28, 2016 09:34 AM UTC

Hi

How can I read the current data in a sheet and change certain cells?

Cheers

Mohan Kumar Ramasamy [Syncfusion]
Replied On January 29, 2016 11:24 AM UTC

Hi Freddy,


Thanks for using Syncfusion products.


We would like to let you know that your requirement can be achieved by using “getPropertyValue” and “updateCellValue” method. We can able to get the cell value by using “getPropertyValue” method with argument rowIndex and colIndex. And we can able to update the cell value by using “updateCellValue” with argument rowIndex, colIndex and value. Please refer the below code snippets.


[.html file]

<script>

        $(function () {

            $("#Spreadsheet").ejSpreadsheet({

                ---------

                loadComplete: "loadComplete",

                ---------

            });

        });

        function loadComplete(args) {

            --------

           // [this] is Spreadsheet Object


           //Get cell value using this method

           var value = this.XLEdit.getPropertyValue(2, 3)  // To Pass the rowIndex ,colIndex


           //To get range of data using this method.

            var rangeData = this.getRangeData("C2:D7")   


            //To Update the cell value using this method

            this.XLEdit.updateCellValue({ rowIndex: 1, colIndex: 1 }, "Update Cell Value"); 


            }

       

    </script>


Please refer the below link for API document for JS Spreadsheet.


Link: http://help.syncfusion.com/js/api/ejspreadsheet


We have created a simple sample with read and update the data code snippets in JS Playground. Please refer the below sample link.


JS Playground Sample Link: http://jsplayground.syncfusion.com/ylrswe1t


Please let us know if you need any further assistance.


Regards,

Mohankumar R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;