コード例 #1
0
ファイル: ExcelDocument.cs プロジェクト: ooyuan/micro-emall
        public bool CreatExcel(string sheetName)
        {
            bool   flag     = false;
            string fileName = this.AbsoluteFileName;

            if (!General.IsNullable(fileName))
            {
                using (SpreadsheetDocument excelDocument = CreateDocument(fileName))
                {
                    //添加工作表
                    WorksheetPart worksheetPart = excelDocument.WorkbookPart.InsertSheet(sheetName);
                    flag = worksheetPart.InsertCell(this._cells) > 0;
                }
            }

            return(flag);
        }