The %worksheet_set_selection() function can be used to specify which cell or range of cells is selected in a worksheet: The most common requirement is to select a single cell, in which case the first_ and last_ parameters should be the same.
The active cell within a selected range is determined by the order in which first_ and last_ are specified.
@code worksheet_set_selection(worksheet1, 3, 3, 3, 3); // Cell D4. worksheet_set_selection(worksheet2, 3, 3, 6, 6); // Cells D4 to G7. worksheet_set_selection(worksheet3, 6, 6, 3, 3); // Cells G7 to D4. worksheet_set_selection(worksheet5, RANGE("D4:G7")); // Using the RANGE macro.
@endcode
@brief Set the selected cell or cells in a worksheet:
@param worksheet Pointer to a lxw_worksheet instance to be updated. @param first_row The first row of the range. (All zero indexed.) @param first_col The first column of the range. @param last_row The last row of the range. @param last_col The last col of the range.