Extracting Plain Text from the Table of OneNote Document

Aspose.Note for .NET allows developers to extract text from the entire table, a row or a particular cell element.

Aspose.Note for .NET offers the Document class that represents a OneNote file. The Document class exposes the GetChildNodes method that can be called to extract table nodes from a OneNote document.

Get Table Text from OneNote Document

This example works as follows:

  1. Create an object of the Document class.
  2. Call the Document class’ GetChildNodes method.
  3. Retrieve a list of table nodes.
  4. Call the LINQ-based Code to extract text
  5. Display text on the output screen.

The following code example demonstrates how to get table text from a OneNote document.

Get Row Text from a Table in a OneNote Document

This example works as follows:

  1. Create an object of the Document class.
  2. Filter out a list of table nodes.
  3. Iterate through table rows.
  4. Call the LINQ-based Code to extract text.
  5. Display the text on the output screen.

The following code example demonstrates how to extract row text from a table in a OneNote document.

Get Cell Text from a Row in a Table

This example works as follows:

  1. Create an object of the Document class.
  2. Filter out a list of table nodes.
  3. Iterate through the table rows.
  4. Filter out a list of cell nodes from each row.
  5. Iterate through the row cells.
  6. Call the LINQ-based Code to extract text.
  7. Display the text on the output screen.

The following code example demonstrates how to get cell text from a row of the table.

Insert a Table in OneNote Document

Aspose.Note for .NET APIs allows developers to insert a table at particular node position. This article is meant to show you how to create a table in OneNote document programmatically.

Aspose.Note for .NET offers the Document class that represents a OneNote file. Developers can append content under TableCell node, table cells to the TableRow node, table row to the Table node. Later they could append table under OutlineElement node, outline element to Outline node, outline to Page node and then a page to the Document node. It’s all based on the Aspose.Note DOM structure.

The following code example demonstrates how to insert a table in a OneNote document.

Create a Table with Locked Columns in the OneNote Document

Aspose.Note for .NET APIs allows developers to insert a table at particular node position. This article is meant to show you how to create a table with a locked column in OneNote document programmatically.

Aspose.Note for .NET offers the Document class that represents a OneNote file. Developers can append content under TableCell node, table cells to the TableRow node, table row to the Table node. LockedWidth property of the Table class allows to bolt its width. Later they could append table under OutlineElement node, outline element to Outline node, outline to Page node and then a page to the Document node. It’s all based on the Aspose.Note DOM structure.

The following code example demonstrates how to insert a table with locked columns in a OneNote document.

Setting Cell Background Color

GetOutlineElementWithText Method