AODL.Document.Content.Tables.Table.CreateCell C# (CSharp) Метод

CreateCell() публичный Метод

Create a new cell within this table which use the standard style. The cell isn't part of the table until you insert it via the InsertCellAt(int rowIndex, int columnIndex, Cell cell)
public CreateCell ( ) : Cell
Результат Cell
		public Cell CreateCell()
		{
			Cell cell			= new Cell(this.Document);
			return cell;
		}

Usage Example

Пример #1
0
		public  void CreateRowsAndColumns()
		{
			SpreadsheetDocument doc = new SpreadsheetDocument ();
			doc.New ();
			Table table = new Table (doc,"tab1","tab1");
			
			for(int i=1; i<=4; i++)
			{
				for(int j=1; j<=5;j++)
				{
					Cell cell = table.CreateCell ();
					cell.OfficeValueType ="float";
					Paragraph paragraph = new Paragraph (doc);
					string text= (j+i-1).ToString();
					paragraph.TextContent .Add (new SimpleText ( doc,text));
					cell.Content.Add(paragraph);
					cell.OfficeValueType = "string";
					cell.OfficeValue = text;
					
					table.InsertCellAt (i, j, cell);
				}
			}
			
			Assert.AreEqual(5, table.Rows.Count);
			for (int i = 1; i < 4; i++)
			{
				Row row = table.Rows[i];
				Assert.AreEqual(6, row.Cells.Count);
			}
			
		}
All Usage Examples Of AODL.Document.Content.Tables.Table::CreateCell