Class Table

Class Table

nazivni prostor: Aspose.Note Sastav: Aspose.Note.dll (25.4.0)

Predstavljajte stol.

public sealed class Table : CompositeNode<tablerow>, ICompositeNode<tablerow>, ICompositeNode, IEnumerable<tablerow>, IEnumerable, IOutlineElementChildNode, ITaggable, INode

Inheritance

object Node CompositeNodeBase CompositeNode Table

Implements

ICompositeNode , ICompositeNode , IEnumerable , IEnumerable , IOutlineElementChildNode , ITaggable , INode

naslijeđeni članovi

CompositeNode.GetEnumerator() , CompositeNode.InsertChild(int, T1) , CompositeNode.InsertChildrenRange(int, IEnumerable) , CompositeNode.InsertChildrenRange(int, params TableRow[]) , CompositeNode.AppendChildFirst(T1) , CompositeNode.AppendChildLast(T1) , CompositeNode.RemoveChild(T1) , CompositeNode.Accept(DocumentVisitor) , CompositeNode.GetChildNodes(NodeType) , CompositeNode.GetChildNodes() , CompositeNode.IsComposite , CompositeNode.FirstChild , CompositeNode.LastChild , CompositeNodeBase.GetChildNodes(NodeType) , CompositeNodeBase.GetChildNodes() , Node.Accept(DocumentVisitor) , Node.Document , Node.IsComposite , Node.NodeType , Node.ParentNode , Node.PreviousSibling , Node.NextSibling , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Pokaže kako dobiti tekst iz svakog redova tablice.

// The path to the documents directory.
                                                        string dataDir = RunExamples.GetDataDir_Tables();

                                                        // Load the document into Aspose.Note.
                                                        Document document = new Document(dataDir + "Sample1.one");

                                                        // Get a list of table nodes
                                                        IList<table> nodes = document.GetChildNodes<table>();

                                                        foreach (Table table in nodes)
                                                        {
                                                            // Iterate through table rows
                                                            foreach (TableRow row in table)
                                                            {
                                                                // Retrieve text
                                                                string text = string.Join(Environment.NewLine, row.GetChildNodes<richtext>().Select(e =&gt; e.Text)) + Environment.NewLine;

                                                                // Print text on the output screen
                                                                Console.WriteLine(text);
                                                            }
                                                        }</richtext></table></table>

Pokaži kako dobiti tekst iz tablice.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_Tables();

                                              // Load the document into Aspose.Note.
                                              Document document = new Document(dataDir + "Sample1.one");

                                              // Get a list of table nodes
                                              IList<table> nodes = document.GetChildNodes<table>();

                                              // Set table count
                                              int tblCount = 0;

                                              foreach (Table table in nodes)
                                              {
                                                  tblCount++;
                                                  Console.WriteLine("table # " + tblCount);

                                                  // Retrieve text
                                                  string text = string.Join(Environment.NewLine, table.GetChildNodes<richtext>().Select(e =&gt; e.Text)) + Environment.NewLine;

                                                  // Print text on the output screen
                                                  Console.WriteLine(text);
                                              }</richtext></table></table>

Pokaže kako dobiti tekst iz stanica tablice.

// The path to the documents directory.
                                                      string dataDir = RunExamples.GetDataDir_Tables();

                                                      // Load the document into Aspose.Note.
                                                      Document document = new Document(dataDir + "Sample1.one");

                                                      // Get a list of table nodes
                                                      IList<table> nodes = document.GetChildNodes<table>();        

                                                      foreach (Table table in nodes)
                                                      {
                                                          // Iterate through table rows
                                                          foreach (TableRow row in table)
                                                          {
                                                              // Get list of TableCell nodes
                                                              // Iterate through table cells
                                                              foreach (TableCell cell in row)
                                                              {
                                                                  // Retrieve text
                                                                  string text = string.Join(Environment.NewLine, cell.GetChildNodes<richtext>().Select(e =&gt; e.Text)) + Environment.NewLine;

                                                                  // Print text on the output screen
                                                                  Console.WriteLine(text);
                                                              }
                                                          }
                                                      }</richtext></table></table>

Pokaže kako postaviti boju pozadine za stanicu.

// Create an object of the Document class
                                                          Document doc = new Document();

                                                          // Initialize TableCell class object and set text content
                                                          TableCell cell11 = new TableCell(doc);
                                                          cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                          cell11.BackgroundColor = Color.Coral;

                                                          // Initialize TableRow class object
                                                          TableRow row = new TableRow(doc);
                                                          row.AppendChildLast(cell11);

                                                          Table table = new Table(doc)
                                                                        {
                                                                            IsBordersVisible = true,
                                                                            Columns = { new TableColumn() { Width = 200 } }
                                                                        };
                                                          table.AppendChildLast(row);

                                                          OutlineElement oe = new OutlineElement(doc);
                                                          oe.AppendChildLast(table);

                                                          Outline o = new Outline(doc);
                                                          o.AppendChildLast(oe);

                                                          // Initialize Page class object
                                                          Page page = new Page(doc);
                                                          page.AppendChildLast(o);

                                                          doc.AppendChildLast(page);

                                                          doc.Save(Path.Combine(RunExamples.GetDataDir_Tables(), "SettingCellBackGroundColor.pdf"));

Pokaži kako dodati novu tablicu s tagom.

// The path to the documents directory.
                                               string dataDir = RunExamples.GetDataDir_Tags();

                                               // Create an object of the Document class
                                               Document doc = new Document();

                                               // Initialize Page class object
                                               Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                               // Initialize TableRow class object
                                               TableRow row = new TableRow(doc);

                                               // Initialize TableCell class object
                                               TableCell cell = new TableCell(doc);

                                               // Insert cell content
                                               cell.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Single cell."));

                                               // Add cell to row node
                                               row.AppendChildLast(cell);

                                               // Initialize table node
                                               Table table = new Table(doc)
                                                             {
                                                                 IsBordersVisible = true,
                                                                 Columns = { new TableColumn { Width = 70 } }
                                                             };

                                               // Insert row node in table
                                               table.AppendChildLast(row);

                                               // Add tag to this table node
                                               table.Tags.Add(NoteTag.CreateQuestionMark());

                                               Outline outline = new Outline(doc);
                                               OutlineElement outlineElem = new OutlineElement(doc);

                                               // Add table node
                                               outlineElem.AppendChildLast(table);

                                               // Add outline elements
                                               outline.AppendChildLast(outlineElem);
                                               page.AppendChildLast(outline);
                                               doc.AppendChildLast(page);

                                               // Save OneNote document
                                               dataDir = dataDir + "AddTableNodeWithTag_out.one";
                                               doc.Save(dataDir);

Prikazuje kako stvoriti stolicu s zatvorenom stolicom.

// The path to the documents directory.
                                                            string dataDir = RunExamples.GetDataDir_Tables();

                                                            // Create an object of the Document class
                                                            Document doc = new Document();

                                                            // Initialize Page class object
                                                            Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                            // Initialize TableRow class object
                                                            TableRow row1 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell11 = new TableCell(doc);
                                                            cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                            row1.AppendChildLast(cell11);

                                                            // Initialize TableRow class object
                                                            TableRow row2 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell21 = new TableCell(doc);
                                                            cell21.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Long   text    with    several   words and    spaces."));
                                                            row2.AppendChildLast(cell21);

                                                            // Initialize Table class object
                                                            Table table = new Table(doc)
                                                                          {
                                                                              IsBordersVisible = true,
                                                                              Columns = { new TableColumn { Width = 70, LockedWidth = true } }
                                                                          };

                                                            // Add rows
                                                            table.AppendChildLast(row1);
                                                            table.AppendChildLast(row2);

                                                            Outline outline = new Outline(doc);
                                                            OutlineElement outlineElem = new OutlineElement(doc);

                                                            // Add table node
                                                            outlineElem.AppendChildLast(table);

                                                            // Add outline element node
                                                            outline.AppendChildLast(outlineElem);

                                                            // Add outline node
                                                            page.AppendChildLast(outline);

                                                            // Add page node
                                                            doc.AppendChildLast(page);
                                                            dataDir = dataDir + "CreateTableWithLockedColumns_out.one";
                                                            doc.Save(dataDir);

Pokaži kako stvoriti novu tablicu.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Tables();

                                           // Create an object of the Document class
                                           Document doc = new Document();

                                           // Initialize Page class object
                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                           // Initialize TableRow class object
                                           TableRow row1 = new TableRow(doc);

                                           // Initialize TableCell class objects
                                           TableCell cell11 = new TableCell(doc);
                                           TableCell cell12 = new TableCell(doc);
                                           TableCell cell13 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell11.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.1"));
                                           cell12.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.2"));
                                           cell13.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.3"));

                                           // Table cells to rows
                                           row1.AppendChildLast(cell11);
                                           row1.AppendChildLast(cell12);
                                           row1.AppendChildLast(cell13);

                                           // Initialize TableRow class object
                                           TableRow row2 = new TableRow(doc);

                                           // initialize TableCell class objects
                                           TableCell cell21 = new TableCell(doc);
                                           TableCell cell22 = new TableCell(doc);
                                           TableCell cell23 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell21.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.1"));
                                           cell22.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.2"));
                                           cell23.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.3"));

                                           // Append table cells to rows
                                           row2.AppendChildLast(cell21);
                                           row2.AppendChildLast(cell22);
                                           row2.AppendChildLast(cell23);

                                           // Initialize Table class object and set column widths
                                           Table table = new Table(doc)
                                                         {
                                                             IsBordersVisible = true,
                                                             Columns = { new TableColumn { Width = 200 }, new TableColumn { Width = 200 }, new TableColumn { Width = 200 } }
                                                         };

                                           // Append table rows to table
                                           table.AppendChildLast(row1);
                                           table.AppendChildLast(row2);

                                           // Initialize Outline object
                                           Outline outline = new Outline(doc);

                                           // Initialize OutlineElement object
                                           OutlineElement outlineElem = new OutlineElement(doc);

                                           // Add table to outline element node
                                           outlineElem.AppendChildLast(table);

                                           // Add outline element to outline
                                           outline.AppendChildLast(outlineElem);

                                           // Add outline to page node
                                           page.AppendChildLast(outline);

                                           // Add page to document node
                                           doc.AppendChildLast(page);
                                           dataDir = dataDir + "InsertTable_out.one";
                                           doc.Save(dataDir);

Constructors

Table()

public Table()

Properties

Columns

Pronađite kolone na stolu.

public IList<tablecolumn> Columns { get; }

Vrijednost nekretnina

IList < TableColumn >

Examples

Pokaže kako postaviti boju pozadine za stanicu.

// Create an object of the Document class
                                                          Document doc = new Document();

                                                          // Initialize TableCell class object and set text content
                                                          TableCell cell11 = new TableCell(doc);
                                                          cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                          cell11.BackgroundColor = Color.Coral;

                                                          // Initialize TableRow class object
                                                          TableRow row = new TableRow(doc);
                                                          row.AppendChildLast(cell11);

                                                          Table table = new Table(doc)
                                                                        {
                                                                            IsBordersVisible = true,
                                                                            Columns = { new TableColumn() { Width = 200 } }
                                                                        };
                                                          table.AppendChildLast(row);

                                                          OutlineElement oe = new OutlineElement(doc);
                                                          oe.AppendChildLast(table);

                                                          Outline o = new Outline(doc);
                                                          o.AppendChildLast(oe);

                                                          // Initialize Page class object
                                                          Page page = new Page(doc);
                                                          page.AppendChildLast(o);

                                                          doc.AppendChildLast(page);

                                                          doc.Save(Path.Combine(RunExamples.GetDataDir_Tables(), "SettingCellBackGroundColor.pdf"));

Pokaži kako dodati novu tablicu s tagom.

// The path to the documents directory.
                                               string dataDir = RunExamples.GetDataDir_Tags();

                                               // Create an object of the Document class
                                               Document doc = new Document();

                                               // Initialize Page class object
                                               Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                               // Initialize TableRow class object
                                               TableRow row = new TableRow(doc);

                                               // Initialize TableCell class object
                                               TableCell cell = new TableCell(doc);

                                               // Insert cell content
                                               cell.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Single cell."));

                                               // Add cell to row node
                                               row.AppendChildLast(cell);

                                               // Initialize table node
                                               Table table = new Table(doc)
                                                             {
                                                                 IsBordersVisible = true,
                                                                 Columns = { new TableColumn { Width = 70 } }
                                                             };

                                               // Insert row node in table
                                               table.AppendChildLast(row);

                                               // Add tag to this table node
                                               table.Tags.Add(NoteTag.CreateQuestionMark());

                                               Outline outline = new Outline(doc);
                                               OutlineElement outlineElem = new OutlineElement(doc);

                                               // Add table node
                                               outlineElem.AppendChildLast(table);

                                               // Add outline elements
                                               outline.AppendChildLast(outlineElem);
                                               page.AppendChildLast(outline);
                                               doc.AppendChildLast(page);

                                               // Save OneNote document
                                               dataDir = dataDir + "AddTableNodeWithTag_out.one";
                                               doc.Save(dataDir);

Prikazuje kako stvoriti stolicu s zatvorenom stolicom.

// The path to the documents directory.
                                                            string dataDir = RunExamples.GetDataDir_Tables();

                                                            // Create an object of the Document class
                                                            Document doc = new Document();

                                                            // Initialize Page class object
                                                            Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                            // Initialize TableRow class object
                                                            TableRow row1 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell11 = new TableCell(doc);
                                                            cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                            row1.AppendChildLast(cell11);

                                                            // Initialize TableRow class object
                                                            TableRow row2 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell21 = new TableCell(doc);
                                                            cell21.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Long   text    with    several   words and    spaces."));
                                                            row2.AppendChildLast(cell21);

                                                            // Initialize Table class object
                                                            Table table = new Table(doc)
                                                                          {
                                                                              IsBordersVisible = true,
                                                                              Columns = { new TableColumn { Width = 70, LockedWidth = true } }
                                                                          };

                                                            // Add rows
                                                            table.AppendChildLast(row1);
                                                            table.AppendChildLast(row2);

                                                            Outline outline = new Outline(doc);
                                                            OutlineElement outlineElem = new OutlineElement(doc);

                                                            // Add table node
                                                            outlineElem.AppendChildLast(table);

                                                            // Add outline element node
                                                            outline.AppendChildLast(outlineElem);

                                                            // Add outline node
                                                            page.AppendChildLast(outline);

                                                            // Add page node
                                                            doc.AppendChildLast(page);
                                                            dataDir = dataDir + "CreateTableWithLockedColumns_out.one";
                                                            doc.Save(dataDir);

Pokaži kako stvoriti novu tablicu.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Tables();

                                           // Create an object of the Document class
                                           Document doc = new Document();

                                           // Initialize Page class object
                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                           // Initialize TableRow class object
                                           TableRow row1 = new TableRow(doc);

                                           // Initialize TableCell class objects
                                           TableCell cell11 = new TableCell(doc);
                                           TableCell cell12 = new TableCell(doc);
                                           TableCell cell13 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell11.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.1"));
                                           cell12.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.2"));
                                           cell13.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.3"));

                                           // Table cells to rows
                                           row1.AppendChildLast(cell11);
                                           row1.AppendChildLast(cell12);
                                           row1.AppendChildLast(cell13);

                                           // Initialize TableRow class object
                                           TableRow row2 = new TableRow(doc);

                                           // initialize TableCell class objects
                                           TableCell cell21 = new TableCell(doc);
                                           TableCell cell22 = new TableCell(doc);
                                           TableCell cell23 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell21.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.1"));
                                           cell22.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.2"));
                                           cell23.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.3"));

                                           // Append table cells to rows
                                           row2.AppendChildLast(cell21);
                                           row2.AppendChildLast(cell22);
                                           row2.AppendChildLast(cell23);

                                           // Initialize Table class object and set column widths
                                           Table table = new Table(doc)
                                                         {
                                                             IsBordersVisible = true,
                                                             Columns = { new TableColumn { Width = 200 }, new TableColumn { Width = 200 }, new TableColumn { Width = 200 } }
                                                         };

                                           // Append table rows to table
                                           table.AppendChildLast(row1);
                                           table.AppendChildLast(row2);

                                           // Initialize Outline object
                                           Outline outline = new Outline(doc);

                                           // Initialize OutlineElement object
                                           OutlineElement outlineElem = new OutlineElement(doc);

                                           // Add table to outline element node
                                           outlineElem.AppendChildLast(table);

                                           // Add outline element to outline
                                           outline.AppendChildLast(outlineElem);

                                           // Add outline to page node
                                           page.AppendChildLast(outline);

                                           // Add page to document node
                                           doc.AppendChildLast(page);
                                           dataDir = dataDir + "InsertTable_out.one";
                                           doc.Save(dataDir);

IsBordersVisible

Dobiva ili postavlja vrijednost koja ukazuje na to je li granica tablice vidljiva.

public bool IsBordersVisible { get; set; }

Vrijednost nekretnina

bool

Examples

Pokaže kako postaviti boju pozadine za stanicu.

// Create an object of the Document class
                                                          Document doc = new Document();

                                                          // Initialize TableCell class object and set text content
                                                          TableCell cell11 = new TableCell(doc);
                                                          cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                          cell11.BackgroundColor = Color.Coral;

                                                          // Initialize TableRow class object
                                                          TableRow row = new TableRow(doc);
                                                          row.AppendChildLast(cell11);

                                                          Table table = new Table(doc)
                                                                        {
                                                                            IsBordersVisible = true,
                                                                            Columns = { new TableColumn() { Width = 200 } }
                                                                        };
                                                          table.AppendChildLast(row);

                                                          OutlineElement oe = new OutlineElement(doc);
                                                          oe.AppendChildLast(table);

                                                          Outline o = new Outline(doc);
                                                          o.AppendChildLast(oe);

                                                          // Initialize Page class object
                                                          Page page = new Page(doc);
                                                          page.AppendChildLast(o);

                                                          doc.AppendChildLast(page);

                                                          doc.Save(Path.Combine(RunExamples.GetDataDir_Tables(), "SettingCellBackGroundColor.pdf"));

Pokaži kako dodati novu tablicu s tagom.

// The path to the documents directory.
                                               string dataDir = RunExamples.GetDataDir_Tags();

                                               // Create an object of the Document class
                                               Document doc = new Document();

                                               // Initialize Page class object
                                               Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                               // Initialize TableRow class object
                                               TableRow row = new TableRow(doc);

                                               // Initialize TableCell class object
                                               TableCell cell = new TableCell(doc);

                                               // Insert cell content
                                               cell.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Single cell."));

                                               // Add cell to row node
                                               row.AppendChildLast(cell);

                                               // Initialize table node
                                               Table table = new Table(doc)
                                                             {
                                                                 IsBordersVisible = true,
                                                                 Columns = { new TableColumn { Width = 70 } }
                                                             };

                                               // Insert row node in table
                                               table.AppendChildLast(row);

                                               // Add tag to this table node
                                               table.Tags.Add(NoteTag.CreateQuestionMark());

                                               Outline outline = new Outline(doc);
                                               OutlineElement outlineElem = new OutlineElement(doc);

                                               // Add table node
                                               outlineElem.AppendChildLast(table);

                                               // Add outline elements
                                               outline.AppendChildLast(outlineElem);
                                               page.AppendChildLast(outline);
                                               doc.AppendChildLast(page);

                                               // Save OneNote document
                                               dataDir = dataDir + "AddTableNodeWithTag_out.one";
                                               doc.Save(dataDir);

Prikazuje kako stvoriti stolicu s zatvorenom stolicom.

// The path to the documents directory.
                                                            string dataDir = RunExamples.GetDataDir_Tables();

                                                            // Create an object of the Document class
                                                            Document doc = new Document();

                                                            // Initialize Page class object
                                                            Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                            // Initialize TableRow class object
                                                            TableRow row1 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell11 = new TableCell(doc);
                                                            cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
                                                            row1.AppendChildLast(cell11);

                                                            // Initialize TableRow class object
                                                            TableRow row2 = new TableRow(doc);

                                                            // Initialize TableCell class object and set text content
                                                            TableCell cell21 = new TableCell(doc);
                                                            cell21.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Long   text    with    several   words and    spaces."));
                                                            row2.AppendChildLast(cell21);

                                                            // Initialize Table class object
                                                            Table table = new Table(doc)
                                                                          {
                                                                              IsBordersVisible = true,
                                                                              Columns = { new TableColumn { Width = 70, LockedWidth = true } }
                                                                          };

                                                            // Add rows
                                                            table.AppendChildLast(row1);
                                                            table.AppendChildLast(row2);

                                                            Outline outline = new Outline(doc);
                                                            OutlineElement outlineElem = new OutlineElement(doc);

                                                            // Add table node
                                                            outlineElem.AppendChildLast(table);

                                                            // Add outline element node
                                                            outline.AppendChildLast(outlineElem);

                                                            // Add outline node
                                                            page.AppendChildLast(outline);

                                                            // Add page node
                                                            doc.AppendChildLast(page);
                                                            dataDir = dataDir + "CreateTableWithLockedColumns_out.one";
                                                            doc.Save(dataDir);

Pokaži kako stvoriti novu tablicu.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Tables();

                                           // Create an object of the Document class
                                           Document doc = new Document();

                                           // Initialize Page class object
                                           Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                           // Initialize TableRow class object
                                           TableRow row1 = new TableRow(doc);

                                           // Initialize TableCell class objects
                                           TableCell cell11 = new TableCell(doc);
                                           TableCell cell12 = new TableCell(doc);
                                           TableCell cell13 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell11.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.1"));
                                           cell12.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.2"));
                                           cell13.AppendChildLast(GetOutlineElementWithText(doc, "cell_1.3"));

                                           // Table cells to rows
                                           row1.AppendChildLast(cell11);
                                           row1.AppendChildLast(cell12);
                                           row1.AppendChildLast(cell13);

                                           // Initialize TableRow class object
                                           TableRow row2 = new TableRow(doc);

                                           // initialize TableCell class objects
                                           TableCell cell21 = new TableCell(doc);
                                           TableCell cell22 = new TableCell(doc);
                                           TableCell cell23 = new TableCell(doc);

                                           // Append outline elements in the table cell
                                           cell21.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.1"));
                                           cell22.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.2"));
                                           cell23.AppendChildLast(GetOutlineElementWithText(doc, "cell_2.3"));

                                           // Append table cells to rows
                                           row2.AppendChildLast(cell21);
                                           row2.AppendChildLast(cell22);
                                           row2.AppendChildLast(cell23);

                                           // Initialize Table class object and set column widths
                                           Table table = new Table(doc)
                                                         {
                                                             IsBordersVisible = true,
                                                             Columns = { new TableColumn { Width = 200 }, new TableColumn { Width = 200 }, new TableColumn { Width = 200 } }
                                                         };

                                           // Append table rows to table
                                           table.AppendChildLast(row1);
                                           table.AppendChildLast(row2);

                                           // Initialize Outline object
                                           Outline outline = new Outline(doc);

                                           // Initialize OutlineElement object
                                           OutlineElement outlineElem = new OutlineElement(doc);

                                           // Add table to outline element node
                                           outlineElem.AppendChildLast(table);

                                           // Add outline element to outline
                                           outline.AppendChildLast(outlineElem);

                                           // Add outline to page node
                                           page.AppendChildLast(outline);

                                           // Add page to document node
                                           doc.AppendChildLast(page);
                                           dataDir = dataDir + "InsertTable_out.one";
                                           doc.Save(dataDir);

LastModifiedTime

Pronađite ili postavite posljednje izmijenjene vrijeme.

public DateTime LastModifiedTime { get; set; }

Vrijednost nekretnina

DateTime

Tags

Pronađite popis svih oznaka jednog stavka.

public List<itag> Tags { get; }

Vrijednost nekretnina

List < ITag >

Methods

Accept(DocumentVisitor)

Prihvaćaju posjetitelja čvorova.

public override void Accept(DocumentVisitor visitor)

Parameters

visitor DocumentVisitor

Objekt klase koji proizlazi iz Aspose.Note.DocumentVisitor.

 Hrvatski