标签: excel vb.net save
我想知道如何将Excel工作簿保存到常规路径中。我想在各种计算机上使用我的程序,每次在新计算机上使用程序时,我都不想更改程序中的路径位置。
答案 0 :(得分:0)
您可以像这样使用Application.StartupPath:
Application.StartupPath
Dim myPath As String = Application.StartupPath & "\myexcel.xlsx"
这会将您的文件保存到程序的文件夹中。