You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varworkbook=newXLWorkbook();varws=workbook.Worksheets.Add("Rows of a Range");// All rows in a rangews.Range("A1:B2").Rows().Style.Fill.BackgroundColor=XLColor.DimGray;varbigRange=ws.Range("B4:C17");// Contiguous rows by numberbigRange.Rows(1,2).Style.Fill.BackgroundColor=XLColor.Red;// Contiguous rows by numberbigRange.Rows("4:5").Style.Fill.BackgroundColor=XLColor.Blue;// Spread rows by numberbigRange.Rows("7:8,10:11").Style.Fill.BackgroundColor=XLColor.Orange;// Using a single numberbigRange.Rows("13").Style.Fill.BackgroundColor=XLColor.Cyan;// Only the used rows in a worksheetws.Rows().Height=15;
Selecting Rows in a Worksheet
varws2=workbook.Worksheets.Add("Rows of a Worksheet");// Contiguous rows by numberws2.Rows(1,2).Style.Fill.BackgroundColor=XLColor.Red;// Contiguous rows by numberws2.Rows("4:5").Style.Fill.BackgroundColor=XLColor.Blue;// Spread rows by numberws2.Rows("7:8,10:11").Style.Fill.BackgroundColor=XLColor.Orange;// Using a single numberws2.Rows("13").Style.Fill.BackgroundColor=XLColor.Cyan;ws2.Rows("1:13").Height=15;workbook.SaveAs("SelectingRows.xlsx");