Add a name to the UsedRange

Jun 1, 2012 at 12:32 PM

How do you add a name to the UsedRange prop.

So if I have :

ExcelRange excelRange = xlsWSheet.Cells[startRow, startColumn, endRow, endColumn];
How do I have somethng like

excelRange.Name = "XYZ";



Jun 13, 2012 at 7:37 PM

You can add a name using the Worksheet.Names collection or the Workbook.Names collection

Jul 20, 2012 at 12:03 PM

This works just fine. Thank you !!!