-2
我正在嘗試打開使用C++編寫的涉及Excel自動化的項目的MSO.dll。但是,當我嘗試#導入MSO.dll時,出現「無法打開源文件」錯誤。我已將文件路徑添加到其他包含目錄(在項目 - >屬性 - >配置屬性 - > C/C++ - >常規)和鏈接器其他包含目錄中。無法打開源文件
這裏是我到目前爲止的代碼:
#pragma region Includes
#include <stdio.h>
#include <windows.h>
//#include "Solution1.h"
#pragma endregion
#pragma region Import the type libraries
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE12\\MSO.DLL" \
rename("RGB", "MSORGB") \
rename("DocumentProperties", "MSODocumentProperties")
using namespace Office;
請不要張貼文字的圖片,而是張貼文字。 –
不知道,編輯了這篇文章。 – manrajt