libxl库下载:https://www.libxl.com/
#include "libxl.h"
#pragma comment(lib,"libxl.lib")
using namespace libxl;
Book *book = xlCreateBook();
Book *book1 = xlCreateXMLBook();
bool load(const wchar_t* filename, const wchar_t* tempFile = 0)
//文件路径
wstring filePath;
book->load(filePath.c_str())
book->save(L"out.xls");
book->release();//使用完Book,必须释放!!!
//创建:
book->addSheet("Sheet Name");
Sheet* sheet = book->getSheet(0); // 获取第一个工作表