![](/img/trans.png)
[英]c++ win32 console application is not recognized as an internal or external command operable program or batch file
[英]exe file is not recognized as an internal or external command, operable program or batch file in C++
我已經為我的研究生成了一個代碼,並且可以正常工作,但是當我添加鏈接標頭以將其與EXCEL連接時,會出現此消息(“ .... exe”未被識別為內部或外部命令,可操作程序或批處理文件C ++)
我的代碼包括C ++和CPLEX。 該代碼可以在其他PC上正常工作,但是在我的PC上會出現。 我的學習不是關於計算機科學的,所以我不是專家。 我的Windows 10和Office 2016。
這是鏈接頭
#pragma once
#pragma region Includes
#include <stdio.h>
#include <windows.h>
#pragma endregion
#pragma region Import the type libraries
//#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52" \
// rename("RGB", "MSORGB") \
// rename("DocumentProperties", "MSODocumentProperties")
// [-or-]
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE16\\MSO.DLL" \
rename("RGB", "MSORGB") \
rename("DocumentProperties", "MSODocumentProperties")
using namespace Office;
//#import "libid:0002E157-0000-0000-C000-000000000046"
// [-or-]
#import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB"
using namespace VBIDE;
//#import "libid:00020813-0000-0000-C000-000000000046" \
// rename("DialogBox", "ExcelDialogBox") \
// rename("RGB", "ExcelRGB") \
// rename("CopyFile", "ExcelCopyFile") \
// rename("ReplaceText", "ExcelReplaceText") \
// no_auto_exclude
// [-or-]
#import "C:\\Program Files\\Microsoft Office\\Office16\\EXCEL.EXE" \
rename("DialogBox", "ExcelDialogBox") \
rename("RGB", "ExcelRGB") \
rename("CopyFile", "ExcelCopyFile") \
rename("ReplaceText", "ExcelReplaceText") \
no_auto_exclude
#pragma endregion
這是消息和錯誤
聽起來您實際上沒有在計算機上安裝Excel。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.