i have tryed to copy a range of cells. works fine but the dropdown lists i have added in my excel template were not copied.
here is my copy code:
Excel xls = new Excel(); xls.Open(Server.MapPath(".") + “\template\Template_7.0.xls”, FileFormatType.Excel2003);
// first xls.Worksheets[1].Cells.InsertRows(24, 6); Range rngSrc = xls.Worksheets[1].Cells.CreateRange(“A18”, “AK23”); Range rngDst = xls.Worksheets[1].Cells.CreateRange(“A24”, “AK29”); rngDst.Copy(rngSrc);
// second xls.Worksheets[1].Cells.InsertRows(9, 2); Range rngSrc2 = xls.Worksheets[1].Cells.CreateRange(“A8”, “BV9”); Range rngDst2 = xls.Worksheets[1].Cells.CreateRange(“A10”, “BV11”); rngDst2.Copy(rngSrc2);