I am unable to get a cell referenced in any of the cell which is being used in the excel

I am unable to get a cell referenced in any of the cell which is being used in the excel.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Eg: if cell c3 has been referenced in i8, i7, whenever the user edits the c3 cell the value is not getting refreshed in I8, I7.

I want to know what are events and procedures available to capture the details whenever a cell is getting changed.

Regards,

Karthik

Hi,

Please call Workbook.CalculatFormula() method to calculate the formulas in the Workbook after changing any cell values and before obtaining the calculated cells values.

e.g
Workbook workbook = new Workbook(@“d:\test\MyFile.xlsx”);
workbook.Worksheets[0].Cells[“C3”].PutValue(123);
workbook.CalculateFormula();
int value = workbook.Worksheets[0].Cells[“I8”].IntValue;
//…

See the document for your reference:
Ways to Calculate Formulas
Formula Calculation Engine

Thank you.

Hi,

How can i find a cell is changed during the runtime of the application. I want to know in which event I should call the procedure "Workbook.CalculatFormula()"

Regards,

Karthik

Hi,

Well, for Aspose.Cells component, we do not support events, so if you are using the library, you need to check by yourself scanning each cell values if they are changed/updated after calling Workbook.CalculateFormulas() method.

I have a doubt, you might be using Aspose.Cells.GridWeb control. If so, you may call GridWeb1.WebWorksheets.RunAllFormulas() method to calculate the formulas in the sheets. Also, you may click on the submit button on the GridWeb to submit the data and re-calculate the formulas. There are some events on the client side to track if a cell is updated or changed, e.g onCellUpdated, see the demo for your reference:

Thank you.

Dear Amjad

We are using aspose grid in web applications ("Aspose.cells.Gridweb")
and in need of Cells based events.
For applying the "webworksheet's - cell value's changes based logics"
For Example
==========
1.A10 cell values is "10"
2. A11 cell is "A10" and A12 cell is "A11"
suppose i am changing the value of cell A10 as 20 then "A11" cell is getting the updation , but the other one cell "A12" is not getting the update.
so , i try to apply & put the code ".WebWorksheets.RunAllFormulas();"
on webworksheet cell's events(cell values modification time).
but i dont have any webworksheet cell's value changes events to apply above said code.
kindly help me on this.
Regards
Kumaran

Hi,

I have implemented your scenario using the latest version v2.4.1.xxxx installing the package:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry274554.aspx

It works fine. I input/update value in the cell and the values are updated accordingly in the referenced cells(having formulas), I can simply click “submit” button on the GridWeb to get the calculated values in teh cells. I even use GridWeb.WebWorksheets.RunAllFormulas() in CellDoublClick event, when I double click any cell (enabling GridWeb’s EnableDoubleClickEvent attribute), the values do calculated properly.

Please try the latest version and let us know if it works fine. If you still find the issue, kindly give us a sample project, zip it and post it here to show the issue, we will check it soon.

Thank you.

hi,

We are getting an issue, attached the file for your reference..."Aspose.odt"

Regards,

Karthik.

Hi,

Thanks for the odt file to show the issue.

Well, since your license file’s expiry date is December 2, 2010, so you cannot use the latest version of Aspose.Cells.GridWeb v2.4.1.xxxx and hence you are getting an exception related to your license’s expiry date. I think you may comment out the licensing lines of code to just check if works fine.

Also, you may try out the previous version e.g Aspose.Cells.GridWeb v2.4.0.xxxx (if it works fine) downloading the Aspose.Cells for .NET package that was released before your subscription expiry date and you may use it:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry269917.aspx

Thank you.

Hi,

We are still getting this error...

At .net 2.0 , while using the old version of dll no problem raised but in the new version of dll , we are getting this error

==============================================================================

CS0117: 'Aspose.Cells.Cell' does not contain a definition for 'Style'

Code is

=======
cells[intHeadRow, i].Style = Mystyle;

also we are getting the error as the attached file

Regards,

Karthik

Hi,

We are still getting this error...

At .net 2.0 , while using the old version of dll no problem raised but in the new version of dll , we are getting this error

==============================================================================

CS0117: 'Aspose.Cells.Cell' does not contain a definition for 'Style'

Code is

=======
cells[intHeadRow, i].Style = Mystyle;

Regards,

Karthik

Hi Karthik,

Well, we have re-organized api structure (we have added some new namespaces and move the relevant api to them to make it more compact and organized) for Aspose.Cells component in the recent versions of the product, see the release notes “Notable Changes for the Users”:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry243604.aspx

Also (just for your knowledge) we have also renamed some apis (regarding collection classes for Aspose.Cells component) e.g Validations class now becomes ValidationCollection etc., see the “Notable Changes for the Users” in the release notes:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry248967.aspx

For complete reference, please see the Aspose.Cells.Documentation and its API Reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/index.html

Now let me come towards your significant error, so you can fix them accordingly:

Aspose.Cells.Style property is actually eliminated/obsoleted now, you should adjust your code to use Aspose.Cells.GetStyle() and Aspose.Cells.SetStyle() methods now(if you are using latest version of Aspose.Cells component), it will also enhance your performance to certain extent:

For complete reference about Cell.GetStyle/SetStyle approach, please see the documents in the section: https://docs.aspose.com/cells/net/data-formatting/#setting-display-formats-of-numbers-and-dates


Thank you.

Hi,

The link which you have given below is not working :

For complete reference, please see the Aspose.Cells.Documentation and its API Reference:
https://docs.aspose.com/cells/net/

Regards,

Karthik.

Hi,

Sorry, the correct hyperlink(with source url(behind)) is pasted here, please try it now:
https://docs.aspose.com/cells/net/

Thank you.