Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Tables.InsertTableUsingDocumentBuilder.SimpleTable C# (CSharp) Метод

SimpleTable() приватный статический Метод

private static SimpleTable ( string dataDir ) : void
dataDir string
Результат void
        private static void SimpleTable(string dataDir)
        {
            // ExStart:SimpleTable
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            // We call this method to start building the table.
            builder.StartTable();
            builder.InsertCell();
            builder.Write("Row 1, Cell 1 Content.");
            // Build the second cell
            builder.InsertCell();
            builder.Write("Row 1, Cell 2 Content.");
            // Call the following method to end the row and start a new row.
            builder.EndRow();

            // Build the first cell of the second row.
            builder.InsertCell();
            builder.Write("Row 2, Cell 1 Content");

            // Build the second cell.
            builder.InsertCell();
            builder.Write("Row 2, Cell 2 Content.");
            builder.EndRow();

            // Signal that we have finished building the table.
            builder.EndTable();

            dataDir = dataDir + "DocumentBuilder.CreateSimpleTable_out.doc";
            // Save the document to disk.
            doc.Save(dataDir);
            // ExEnd:SimpleTable
            Console.WriteLine("\nSimple table created successfully.\nFile saved at " + dataDir);
        }
        private static void FormattedTable(string dataDir)