|
Query |
Response |
|
why Gworksheet.Range("E3:E15).Offset(0, 1).Address -> return: F3. |
The Offset method returns the cell which is shifted by the specified number of rows and columns.
Example:
string address1 = worksheet.Range["E3:E15"].Offset(0, -1).Address; //returns D3
string address2 = worksheet.Range["E3:E15"].Offset(0, 0).Address; //returns E3
string address3 = worksheet.Range["E3:E15"].Offset(0, 1).Address; //returns F3
Please look into following link to know more about Offset method.
|
|
Is there a way for me to check if a string is valid address for Irange , eg "a1::a2" will return an error (must "a1:a2") without trycast? |
When an invalid address is given in IRange, Syncfusion XlsIO throws Argument Exception. |
This is affecting us as well. When Offset is used on a square range (e.g. a Range with address A1:A5), the function returns a single cell and not a range of the same size of the original range. So if I use sheet.Range["A1:A5"].Offset(0,1) it returns B1 instead of B1:B5.