Hi, I am trying to copy a worksheet, and then add this copied worksheet in my workbook. For example,
Excel.Cells.Worksheet wsNew = workbook.Worksheets[workbook.Worksheets.AddCopy(“Positions”)];
Let the worksheet of which name is “Positions” has several named ranges, such as “Positions.Data”.
In this case, it seems that wsNew does not really have the same named range as the “positions”. It seems only the cell datas in the worksheet “Positions” are copied into wsNew, but not the ranges.
Is there any way that I can copy all the named ranges into a new worksheet automatically?