Hello,

Iam new to the c# and excel and iam facing one issue w.r.t. the copysheet API. Plzz let me know if there is some solution to this.

Iam trying to copy a sheet from one excel work book to another excel workbook (both are Excel 1997-2003 .xls format). using workSheet.Copy API. Now my source excel sheet contains some cells with the data validation as a range. For ex -

The Data Validation for the cell A1 is set as (via data validations) range =B21-B22, for
A2 data validation is again set as (via data validations) range =B21-B22,for
A3 data validation is again set as (via data validations) range =B21-B22

Now after the copy of the sheet, in the target sheet what i see is

A1 contains a data validation set as (via data validations) range =B21-B22 but
A2 contains a data validation set as (via data validations) range =B22-B23
A3 contains a data validation set as (via data validations) range =B23-B24

Basically as the rows are getting copied into the new sheet, the data validation range is also increasing, and this makes A2,A3 to have totally different set of validation values. Ideally even for this it should been B21-B22.

Is there any settings that iam supposed Do, to disable this incremental range validation. What i want is, what ever is data validation set in the source cell should be copied to destination cell. If sheet.copy API has this drawback then is there any alternative way to do a copy which doesn't have this problem

Thanks
Paramesh