老师,你好!我有一EXCEL模板表,其中有的列有下拉功能,通过程序打开写入数据再保存后,其下拉功能不能用了,不知如何解决,请指正,谢谢!,代码如下:
Dim Book As New XLS.Book(FileName) '定义一个Excel工作簿
Dim Sheet As XLS.Sheet = Book.Sheets("封面") '引用工作簿的"封面"工作表
Sheet(0,0).Value = "基 本 情 况"
Sheet(1,1).Value = e.Form.Controls("业主名称").text
Sheet(1,8).Value = e.Form.Controls("项目编号").text
Sheet(2,1).Value = e.Form.Controls("项目名称").text
Sheet(2,8).Value = e.Form.Controls("招标编号").text
Sheet(3,1).Value = e.Form.Controls("采购包名称").text
Sheet(3,8).Value = e.Form.Controls("开标时间").text
Dim t As Table = Tables(_Sys_lsb2+"_Table1")
For i As Integer = 0 To t.Rows.Count-1
t.position = i
Sheet(5+i,1).Value = Tables(_Sys_lsb2+"_Table1").Current("供应商名称")
Sheet(5+i,3).Value = Tables(_Sys_lsb2+"_Table1").Current("简称")
Sheet(5+i,4).Value = Tables(_Sys_lsb2+"_Table1").Current("注册资本")
Next
Book.Save(FileName) '保存工作簿
'**********************打开Excel文件
Dim App As New MSExcel.Application
App.Visible = True
Dim Wb As MSExcel.Workbook = App.WorkBooks.Open(FileName)