How to get current or focused cell value in Excel worksheet using C #

Please help me with C # code, which in VSTO is superior, when I selected a cell, the corresponding column focuses. I need to get the column value (which column) and row value (which row is not) on an excel sheet, wherever I focus.

Please help me get the same through code.

And also, I would like to learn VSTO Excel using C #. Offer me some good e-books for free to download and any web links for them.

how to get focused or current value of cell column in VSTO excel using C #

+4
source share
1 answer
Excel.Range rng = (Excel.Range) this.Application.ActiveCell; //get the cell value object cellValue = rng.Value; //get the row and column details int row = rng.Row; int column = rng.Column; 

and here is a quick start guide .

+16
source

Source: https://habr.com/ru/post/1303102/


All Articles