public void AsposeCreateCell(Aspose.Words.DocumentBuilder builder, double width, string text) { builder.InsertCell(); builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single; builder.CellFormat.Borders.Color = System.Drawing.Color.Black; builder.CellFormat.Width = width;//单元格的宽度 builder.CellFormat.LeftPadding = 3;//单元格的左内边距 builder.CellFormat.RightPadding = 3;//单元格的右内边距 builder.RowFormat.Height = 20;//行高 builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = Aspose.Words.ParagraphAlignment.Center;//水平居中对齐 builder.Write(text); }