Get the row and column number of the top left and bottom right corners of the current selection in an Excel spreadsheet.

Call:

excel_request("get_selection_area", int start_row, int start_column, int end_row, int end_column);


Here:

start_row, start_column - row and column number of the upper left corner of the current Excel selection,

end_row, end_column - row and column number of the lower right corner of the current Excel selection.


Example.

In the current Excel spreadsheet, find out which cells are selected.


int start_row,start_column,end_row,end_column,rows,columns;
excel_request("get_selection_area",start_row,start_column,end_row,end_column);