diff --git a/Code/Npoi.Samples.CreateNewSpreadsheet/Program.cs b/Code/Npoi.Samples.CreateNewSpreadsheet/Program.cs index 5574dce..39ff1e8 100644 --- a/Code/Npoi.Samples.CreateNewSpreadsheet/Program.cs +++ b/Code/Npoi.Samples.CreateNewSpreadsheet/Program.cs @@ -80,6 +80,21 @@ namespace Npoi.Samples.CreateNewSpreadsheet Console.WriteLine("Excel Done"); + var newFile2 = @"newbook.core.docx"; + using (var fs = new FileStream(newFile2, FileMode.Create, FileAccess.Write)) { + XWPFDocument doc = new XWPFDocument(); + var p0 = doc.CreateParagraph(); + p0.Alignment = ParagraphAlignment.LEFT; + XWPFRun r0 = p0.CreateRun(); + r0.FontFamily = "宋体"; + r0.FontSize = 18; + r0.IsBold = true; + r0.SetText("未登录过学生的账号密码"); + + doc.Write(fs); + } + Console.WriteLine("Word Done"); + } } } diff --git a/Code/Npoi.Samples.CreateNewSpreadsheet/newbook.core.docx b/Code/Npoi.Samples.CreateNewSpreadsheet/newbook.core.docx new file mode 100644 index 0000000..e69de29