Example #1
0
        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);
        }