Satır veya Sütunun Yazı Tipini ve Rengini Değiştirme

Bir Sütunun Yazı Tipini ve Rengini Değiştirme

Aspose.Cells.GridDesktop kullanarak bir sütunun yazı tipini ve rengini değiştirmek için lütfen aşağıdaki adımları izleyin:

  • İstediğiniz herhangi birine erişinÇalışma kağıdı
  • ErişimKolon yazı tipi ve rengi değiştirilecek olan
  • özelleştirilmiş oluşturunYazı tipi
  • Yı kurYazı tipi arasındaKolon özelleştirilmiş olana
  • Son olarak ayarlaYazı rengi arasındaKolon istenilen herhangiRenk
 //Accessing the worksheet of the Grid that is currently active

Worksheet sheet = gridDesktop1.GetActiveWorksheet();

//Accessing the first column of the worksheet

GridColumn column = sheet.Columns[0];

//Creating a customized Font object

Font font = new Font("Arial", 10, FontStyle.Bold);

//Setting the font of the column to the customized Font object

column.SetFont(font);

//Setting the font color of the column to Blue

column.SetFontColor(Color.Blue);

Bir Satırın Yazı Tipini ve Rengini Değiştirme

  • İstediğiniz herhangi birine erişinÇalışma kağıdı
  • ErişimSıra yazı tipi ve rengi değiştirilecek olan
  • özelleştirilmiş oluşturunYazı tipi
  • Yı kurYazı tipi arasındaSıra özelleştirilmiş olana
  • Son olarak ayarlaYazı rengi arasındaSıra istenilen herhangiRenk
 //Accessing the worksheet of the Grid that is currently active

Worksheet sheet = gridDesktop1.GetActiveWorksheet();

//Accessing the first row of the worksheet

GridRow row = sheet.Rows[0];

//Creating a customized Font object

Font font = new Font("Arial", 10, FontStyle.Underline);

//Setting the font of the column to the customized Font object

row.SetFont(font);

//Setting the font color of the column to Green

row.SetFontColor(Color.Green);