以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  导入 路径默认  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=154076)

--  作者:nbsugu_z
--  发布时间:2020/9/3 8:35:00
--  导入 路径默认
Dim dlg As New OpenFileDialog
dlg.Filter = "Excel文件|*.xls;*.xlsx"
If dlg.ShowDialog =DialogResult.OK Then
    Dim t As Table = Tables("hyjd")
    t.StopRedraw()
    Dim Book As New XLS.Book(dlg.FileName)
    Dim Sheet As XLS.Sheet = Book.Sheets(0)
    Dim newcount As Integer = 0
    Dim oldcount As Integer = 0
    For n As Integer = 1 To Sheet.Rows.Count -1
........

请教老师,我在EXCEL表导入时,如何增加一个代码,使之按下导入文件按钮后,界面在指定的路径。。
 比如:打开后默认在“计算机”或者在桌面?

[此贴子已经被作者于2020/9/3 8:35:11编辑过]

--  作者:有点蓝
--  发布时间:2020/9/3 9:24:00
--  
参考:http://www.foxtable.com/webhelp/topics/0328.htm.

Dim dlg As New OpenFileDialog
dlg.InitialDirectory = "xx路径" http://www.foxtable.com/webhelp/topics/1996.htm