ListObject.ShowTableStyleRowStripes
ListObject.ShowTableStyleRowStripes property
Indicates whether row stripe formatting is applied to.
public bool ShowTableStyleRowStripes { get; set; }
Examples
using System;
using Aspose.Cells;
using Aspose.Cells.Tables;
namespace AsposeCellsExamples
{
public class ListObjectPropertyShowTableStyleRowStripesDemo
{
public static void Run()
{
// Create a workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add sample data
worksheet.Cells["A1"].PutValue("Name");
worksheet.Cells["B1"].PutValue("Value");
worksheet.Cells["A2"].PutValue("Item1");
worksheet.Cells["B2"].PutValue(100);
worksheet.Cells["A3"].PutValue("Item2");
worksheet.Cells["B3"].PutValue(200);
worksheet.Cells["A4"].PutValue("Item3");
worksheet.Cells["B4"].PutValue(300);
// Create a list object
ListObjectCollection listObjects = worksheet.ListObjects;
int index = listObjects.Add("A1", "B4", true);
ListObject listObject = listObjects[index];
// Demonstrate ShowTableStyleRowStripes property
Console.WriteLine("Before: ShowTableStyleRowStripes = " + listObject.ShowTableStyleRowStripes);
listObject.ShowTableStyleRowStripes = false;
Console.WriteLine("After: ShowTableStyleRowStripes = " + listObject.ShowTableStyleRowStripes);
// Save the workbook
workbook.Save("ListObjectShowTableStyleRowStripesDemo.xlsx", SaveFormat.Xlsx);
}
}
}
See Also
- class ListObject
- namespace Aspose.Cells.Tables
- assembly Aspose.Cells