Hello,
I am using Aspose in a Web Application.
I want to set some style on a cell on OnCellUpdated event. But I am facing some issues.
The cell on which I make my tests is used in a formula in another cell.
Then when I modify my cell and I try to catch the new value of my cell I get the new value of the result of the formula of the other cell…
Is there a way to catch the cell updating manually by the user ?
I have another question : is there a way to get the value of a cell by row index and column index but of another sheet than the active one ?
You can see my code below :
function OnCellUpdated(cell) {
var gridWeb = document.getElementById(’<%=gridWebCalculationArea.ClientID%>’);
var sheetTabIndex = gridWeb.acttab;
var rowIndex = gridWeb.getCellRow(cell);
var columnIndex = gridWeb.getCellColumn(cell);
alert(rowIndex);
alert(columnIndex); //issue here I get 17 which is the index of the formula’s cell instead of 15
var newValue = gridWeb.getCellValue(rowIndex, columnIndex);
alert(newValue); //Then here i logically get the new result of the formula’s cell…
//Here i want to get the value of the cell which have the same row index and column index than the updated cell but in another sheet (hidden one). It doesn’t work.
var processHiddenSheet = document.getElementById(’<%=gridWebCalculationArea.ClientID%>_TAB5’);
var oldValue = processHiddenSheet.getCellValue(rowIndex, columnIndex);
alert(oldValue);
}
Well I apologize i found the solution to get the manually updated cell in another thread on your forum.
I use the parameter “isOriginal” and it works fine !
So there is just the problem to get a cell value from another sheet.
Hi,
//Accessing the second worksheet of the Grid
WebWorksheet sheet = GridWeb1.WebWorksheets[1];//Accessing “B1” cell of the worksheet
WebCell cell = sheet.Cells[“B1”];//Accessing the string value of “B1” cell
string cellVal = cell.StringValue;
Thank you.
Hi,
Yes I know that it is possible on server side. I used that before.
But we have some response time issue and that’s why I need to do it on client side to avoid go/back to server (I am using Ajax).
If it is possible to improve the API on client side to provide the possibility to do this in JavaScript it will be great !
Thanks.
Hi,
Thank you.