0

私はExcelにエクスポートしようとしているc#のdatagridviewを持っています。このチュートリアルhttp://www.c-sharpcorner.com/uploadfile/hrojasara/export-datagridview-to-excel-in-C-Sharp/をフォローしていますが、問題が発生しています。まず、これらのエラーがすべて発生しているため(そのWebサイトと同じコードを使用して)、ビルドすることさえできません。

Warning 3   Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" which is specified by the SDKToolsPath property. You may be able to solve the problem by doing one of the following:  1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK.    MathMunchers
Warning 4   Task could not find "AxImp.exe" using the SdkToolsPath "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed MathMunchers
Warning 5   The referenced component 'Microsoft.Office.Interop.Excel' could not be found.   
Warning 6   The referenced component 'Microsoft.Office.Core' could not be found.    
Warning 7   The referenced component 'VBIDE' could not be found. 

これらのエラーを読むと、コンピューターに特定のものをインストールする必要があるようです。このアプリケーションを任意のWindows 7マシンにエクスポートできるようにしたいので、これを作成するのに良い方法かどうか疑問に思います。エクセルがインストールされています。

4

1 に答える 1

0

これは、ExcelがインストールされているOSまたはExcelライブラリがインストールされているOSでのみ機能します。Excelがインストールされていない別の方法を検討する必要があります。

于 2012-12-02T07:33:15.197 に答える