diff --git a/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Data/Template.docx b/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Data/Template.docx index 06aaab19a..69c1d0948 100644 Binary files a/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Data/Template.docx and b/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Data/Template.docx differ diff --git a/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Program.cs b/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Program.cs index acca5bdf0..4049a3184 100644 --- a/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Program.cs +++ b/Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Program.cs @@ -37,8 +37,13 @@ static void Main(string[] args) cell.CellFormat.VerticalAlignment = VerticalAlignment.Middle; //Disables the text wrap option to avoid displaying longer text on multiple lines. cell.CellFormat.TextWrap = false; - //Sets the text direction for cell. - cell.CellFormat.TextDirection = TextDirection.VerticalBottomToTop; + // Set text direction for each cell in a row + row.Cells[0].CellFormat.TextDirection = TextDirection.Vertical; + row.Cells[1].CellFormat.TextDirection = TextDirection.VerticalBottomToTop; + row.Cells[2].CellFormat.TextDirection = TextDirection.VerticalTopToBottom; + row.Cells[3].CellFormat.TextDirection = TextDirection.VerticalFarEast; + row.Cells[4].CellFormat.TextDirection = TextDirection.HorizontalFarEast; + row.Cells[5].CellFormat.TextDirection = TextDirection.Horizontal; //Accesses the instance of the second cell in the row. cell = row.Cells[1]; cell.CellFormat.BackColor = Color.FromArgb(192, 192, 192);