2012-07-19 79 views
0

在vb.net中使用excel應用程序時出現問題。在vb.net中excel的長文件路徑

我想是這樣的: -

Dim lobjExcelApp As New Application 

Dim lstrSourceFilePath As String = "E:\VTL\VTL_Working\Source\Server Module        Projects\Server Module VTL UnitTesting\TestResults\spfadmin_INSPEXEVTL2K8-1 2012-07-19 14_52_20\Out\..\..\..\..\..\Server Module Projects\Server Module VTL UnitTesting\VTL\Server\Unit Testing\Validation\TestFiles\01 - Tag-Anode Index.xlsx" 


Dim lobjExcelWorkbook As Workbook = lobjExcelApp.Workbooks.Open(lstrSourceFilePath) 

文件路徑是248個字符。

Excel打開文件時會引發錯誤。

此問題發生在Windows Server 2008(64位)和Excel 2007(32位)上

有人能幫助爲什麼這個問題是怎麼引起的?

有沒有解決方法嗎?

感謝

Rupesh

回答