VS未定义类型
一个别人做的软件,本来好的,但是最近想修改的时候出现一个问题,一各表里有几个未定义类型,生成就出错了,谁能帮忙看看。Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
Dim excelApp1 As New Excel.Application
Dim excelBook1 As Excel.Workbook = excelApp1.Workbooks.Add
Dim excelWorksheet1 As Excel.Worksheet = CType(excelBook1.Worksheets(1), Excel.Worksheet)
With excelWorksheet1
.Columns().ColumnWidth = 15
For i As Integer = 0 To mytable7.Columns.Count - 1
.Range(Chr(Asc("A") + i) & "1").Value = mytable7.Columns(i).ColumnName
Next
Dim onerow As DataRow
For i As Integer = 0 To mytable7.Rows.Count - 1
For j As Integer = 0 To mytable7.Columns.Count - 1
.Range((Chr(Asc("A") + j) & i + 2)).Value = "'" + mytable7.Rows(i).Item(j).tostring
Next
Next
excelApp1.Visible = True
End With
End Sub
End Class
红色为未定义类型,谁知道麻烦跟帖下。