Dim dt As Table = Tables("齐套异常")
Dim Book As New XLS.Book '定义一个Excel工作簿
Dim Sheet As XLS.Sheet = Book.Sheets(0) '引用工作簿的第一个工作表
Sheet.Cols(0).Width = 120
Sheet.Cols(1).Width = 200
Sheet.Cols(2).Width = 120
Sheet.Cols(3).Width = 120
Sheet.Cols(4).Width = 200
Sheet.Cols(5).Width = 300
Sheet.Cols(6).Width = 300
Sheet.Cols(7).Width = 120
Dim Style2 As Xls.Style = Book.NewStyle '新建一个样式
Style2. = Format(#12/31/2008#, "yyyy-MM-dd")
Sheet.Cols(2).Style = Style2.
Dim Style As Xls.Style = Book.NewStyle '新建一个样式
Style.AlignHorz = XLS.AlignHorzEnum.Center
Style.AlignVert = XLS.AlignVertEnum.Center
Style.BackColor = Color.Cyan
Style.ForeColor = Color.Red
Style.BorderTop = XLS.LineStyleEnum.Thin
Style.BorderBottom = XLS.LineStyleEnum.Thin
Style.BorderLeft = XLS.LineStyleEnum.Thin
Style.BorderRight = XLS.LineStyleEnum.Thin
Style.BorderColorTop = Color.Black
Style.BorderColorBottom = Color.Black
Style.BorderColorLeft = Color.Black
Style.BorderColorRight = Color.Black
Style.WordWrap = True
Dim fnt As New Font("宋体",14,FontStyle.Bold)
Style.Font = fnt