
如何設置Column間距的欄位間距
Document document = new Document();
document.LoadFromFile(@"..\..\..\..\..\..\Data\TableSample.docx");
Section section = document.Sections[0];
Table table = section.Tables[0] as Table;
//Traverse the first column
for (int i = 0; i < table.Rows.Count; i++)
{
table.Rows[i].Cells[0].SetCellWidth(200,CellWidthType.Point);
}
//Save to file
document.SaveToFile(@"ColumnWidth.docx", FileFormat.Docx);https://firebasestorage.googleapis.com/v0/b/question-bank-dev.appspot.com/o/test%2F988.png?alt=media&token=6ac51657-a6e8-4d54-b40c-f9aba4553662
Document document = new Document();
Section section = document.AddSection();
section.AddParagraph().AppendText("test test test test test test test test test test test test test");
//split the section into two columns with the space 20f
section.Columns.Populate(2, 20f);
section.PageSetup.ColumnsLineBetween = true;
document.SaveToFile("result.docx", FileFormat.Docx2013);