我想在从datatable导出到excel时隐藏列。这是我的代码
`Dim xapp As Application
Dim xWb As Workbook
fileName = System.IO.Path.GetTempFileName & ".xls"
fileName = fileName.Replace(".tmp", "")
xapp = New Application()
xWb = xapp.Workbooks.Open(fileName)
xWb.Sheets(2).Columns("I:I").EntireColumn.Hidden = True`
即使我提到隐藏列的代码,执行时它仍然出现在excel中。请帮我。 提前致谢