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. Image for the cookie policy date

this.setBorder line format using rowIndex & colIndex inquiry

In the documentation I've seen the format:
this.setBorder({ type: "allborder", color: "#000000", style: "solid" }, "A5:V11");

I was wondering if there is a way to use the row and column indexes similar to how we update cell values:
this.XLEdit.updateCellValue({ rowIndex: aNumber, colIndex: aNumber }, someValue);

1 Reply

SI Silambarasan I Syncfusion Team July 18, 2017 11:58 AM UTC

Hi Jacob, 
Thank you for using Syncfusion products. 
We have checked your requirement and it has been achieved by using ‘getRangeIndices()’ client-side method in Spreadsheet. Please refer the following code example. 
var ssObj = $("#Spreadsheet").data("ejSpreadsheet"), cellValue = "SomeValue", 
    cellAddress = "A2"; 
//Update by cell address 
range = ssObj.getRangeIndices(cellAddress); 
ssObj.XLEdit.updateCellValue({ rowIndex: range[0], colIndex: range[1] }, cellValue); 
//You can also convert the range e.g: [0,0,0,0] to cell address by using ssObj.getAlphaRange() 
// ssObj.getAlphaRange(0,0,0,0); // returns "A1" 
Using updateCellVaue(), you can update value and format for single cell only. If you want to update multiple cells with unique value, you can use the ‘updateUniqueData()’ client-side method else use the ‘updateRange()’ method to update range of cells based on defined sheet settings. Please refer the following API links for more information. 
Could you please check the above information and get back to us if we misunderstood your requirement? 

Live Chat Icon For mobile
Up arrow icon