public void CreateSimpleTable()
{
//Create new spreadsheet document
_spreadsheetDocument2 = new SpreadsheetDocument();
_spreadsheetDocument2.Load(AARunMeFirstAndOnce.inPutFolder+@"blank.ods");
//Create a new table
Table table = new Table(_spreadsheetDocument2, "First", "tablefirst");
table.Rows.Add(new Row(table));
//Create a new cell, without any extra styles
Cell cell = new Cell(_spreadsheetDocument2, "cell001");
cell.OfficeValueType = "string";
//Set full border
cell.CellStyle.CellProperties.Border = Border.NormalSolid;
//Add a paragraph to this cell
Paragraph paragraph = ParagraphBuilder.CreateSpreadsheetParagraph(
_spreadsheetDocument2);
//Add some text content
String cellText = "Some text";
paragraph.TextContent.Add(new SimpleText(_spreadsheetDocument2, cellText));
//Add paragraph to the cell
cell.Content.Add(paragraph);
//Insert the cell at row index 2 and column index 3
//All need rows, columns and cells below the given
//indexes will be build automatically.
table.InsertCellAt(1, 1, cell);
//Insert table into the spreadsheet document
_spreadsheetDocument2.TableCollection.Add(table);
// Test inserted content
Assert.AreEqual(_spreadsheetDocument2.TableCollection[0], table);
String text = _spreadsheetDocument2.TableCollection[0].Rows[1].Cells[1].Node.InnerText;
Assert.AreEqual(text, cellText);
}