以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  将EXCL标题赋值给数组  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=92360)

--  作者:刘林
--  发布时间:2016/11/1 19:48:00
--  将EXCL标题赋值给数组
请问如何将打开的EXCL的第一行每列的标题值写入数组中,我试了下不行,请指导
--  作者:有点蓝
--  发布时间:2016/11/1 21:00:00
--  
Dim Book As New XLS.Book("D:\\问题\\123.xls")
Dim Sheet As XLS.Sheet = Book.Sheets(0)

Dim arr(Sheet.Cols.Count - 1) As String
For n As Integer = 0 To Sheet.Cols.Count - 1
    arr(n) = Sheet(0,n).Value
    Output.Show(arr(n))
Next

--  作者:刘林
--  发布时间:2016/11/1 21:33:00
--  
哦,谢谢