Hi everyone.I wanna import an excel file in my programs.First I define a template excel,it has list validation in this template.The datasource of the validation is my database from the SQL Server,when I download the file , I put the data for the list validation,the code like this:
WorkbookDesigner designer = new WorkbookDesigner();
designer.Open(filePath);
designer.ClearDataSource();
designer.SetDataSource(dt);
designer.Process();
designer.Save(fileName, SaveType.OpenInExcel, FileFormatType.Excel2007Xlsm, response);
response.Flush();
response.Close();
response.End();
The "dt" is my datatable from the database,but after download the file,I find the list validation is missing.I don't know the reason.Could you guys please advice.
Thanks,
your wacky zhang