I would like to loop through the rows in my worksheet and apply a style to all of the cells. The style will set the following properties
verticalalignment = top, horizontalalignment = left
Here is the code I am using to setup the style
Dim excel As Excel = New Excel()
excel.Styles.Add()
'Accessing the newly added Style to the Excel object
Dim eStyle As Aspose.Cells.Style = excel.Styles(0)
'Setting the vertical alignment of the text
eStyle.VerticalAlignment = TextAlignmentType.Top
'Setting the horizontal alignment of the text
eStyle.HorizontalAlignment = TextAlignmentType.Left
Here is the code I am trying to use without success to loop through the rows in the worksheet
Dim j As Integer
Dim contentRow As Aspose.Cells.Row = Nothing
For j = 0 To sheet.Cells.Rows.Count
contentRow = sheet.Cells.Rows.Item(j)
contentRow.Style = eStyle
Next
Thanks for your help,
Tyler