I need to create the attached document format programmatically using your product. This is a rough example of the layout I want.
What I cannot work out is how in Aspose.Words code to create three tables side by side, they always end up one above in line with text/paragraphs.
I’d appreciate an example of how to do this and any more information you can provide.
Example Layout.docx (19.3 KB)
@daviddavis In order to achieve display content in different columns you will need to use the TextColumn class (you can found further documentation and code examples of the usage of this class following this link https://reference.aspose.com/words/net/aspose.words/textcolumn/). Now, for your particular case you can use the following code, I omit the specific code to create the tables in order to keep this example short, if you want that code feel free to ask for it to me and if you want to know more about how to work with tables you can do it through this URL https://docs.aspose.com/words/net/working-with-tables/:
Document doc = new Document();
// Initialize a DocumentBuilder
DocumentBuilder builder = new DocumentBuilder(doc);
// Point to the document start
builder.MoveToDocumentStart();
// Set the landscape orientation
builder.PageSetup.Orientation = Orientation.Landscape;
PageSetup pageSetup = builder.PageSetup;
// Add 3 columns of the same width
TextColumnCollection columns = pageSetup.TextColumns;
columns.EvenlySpaced = true;
columns.SetCount(3);
builder.Writeln("Staff Attending");
// Create Staff Attending table
builder.InsertBreak(BreakType.ColumnBreak);
builder.Writeln("Pupils");
// Create Pupils table
builder.InsertBreak(BreakType.ColumnBreak);
builder.Writeln("Equipment");
// Create equipment table
doc.Save("C:\\Temp\\output.docx");