1

我正在使用 Excel 2011 for Mac 并尝试打开一个新文件。

但是,即使文件在那里,我也会不断收到文件未找到的错误。我正在使用的代码如下:

Dim theFile As String

theFile = "/Users/Dev/Desktop/RCM/test.xls"
Workbooks.Open FileName:=theFile

有什么建议么?

4

2 回答 2

1

Mac 使用不同的路径分隔符:将“/”切换为“:”

于 2011-10-02T23:27:05.713 回答
0

制作开放线:

Workbooks.Open Filename:="/Users/John/Downloads/File.xlsx"
于 2015-10-06T14:54:01.857 回答