#region Excel2003
public static void CreatExcel2003()
{
HSSFWorkbook hssfworkbook = new HSSFWorkbook();
create a entry of DocumentSummaryInformation
DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
dsi.Company = "NPOI Team";
hssfworkbook.DocumentSummaryInformation = dsi;
create a entry of SummaryInformation
SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
si.Subject = "NPOI SDK Example";
hssfworkbook.SummaryInformation = si;
//here, we must insert at least one sheet to the workbook. otherwise, Excel will say 'data lost in file'
//So we insert three sheet just like what Excel does
hssfworkbook.CreateSheet("Sheet1");
//Write the stream data of workbook to the root directory
FileStream file = ne
Unity NPOI读写2003
最新推荐文章于 2024-07-23 18:43:26 发布
本文介绍了如何在Unity环境中利用NPOI库进行2003版Excel文件的读写操作,包括数据导入导出、单元格格式设置等关键步骤。
摘要由CSDN通过智能技术生成