// OpenXmlC.cpp : main project file.
#include "stdafx.h"
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Linq;
using namespace DocumentFormat::OpenXml::Packaging;
using namespace DocumentFormat::OpenXml::Spreadsheet;
int main(array<System::String ^> ^args)
{
SpreadsheetDocument^ ssd = SpreadsheetDocument::Open("C:\\******\\ExcelTemplate11.xlsx",false);
WorkbookPart^ wbp = ssd->WorkbookPart;
Workbook^ wb = wbp->Workbook;
Sheet^ sheet = Enumerable::FirstOrDefault(wb->Descendants<Sheet^>());
Console::WriteLine(sheet->Name);
Console::ReadKey();
return 0;
}C++ CLR 读取Worksheet名称
最新推荐文章于 2022-12-05 20:58:53 发布

209

被折叠的 条评论
为什么被折叠?



