EXCEL2016 OLE/COM开发-常用功能封装代码(不断更新完善)
持续补充功能
#pragma once
#include "stdafx.h"
#include "CApplication.h"
#include "CWorkbook.h"
#include "CWorksheet.h"
#include "CRange.h"
#include "CWorkbooks.h"
#include "CWorksheets.h"
#include "Cnterior.h"
#include "CFont0.h"
#include "CShape.h"
#include "CShapes.h"
#include "CPageSetup.h"
#include
#include
using namespace std;
class ExcelApi
{
public:
ExcelApi(void);
~ExcelApi(void);
// 初始化Excel OLE
BOOL InitExcel();
/**
* @brief 新建Excel
* @param[in] ExcalPath 路径
*/
void CreateExcel();
/**
* @brief 打开Excel
* @param[in] filePath 路径
* @param[in] type 打开时是否显示EXCEL
* @return BOOL 打开成功&失败
*/
BOOL OpenFile(const char* filePath, bool type);
/**
* @brief 关闭Excel
*/
void CloseExc