Çalışma Sayfalarını Kaldırma

Bir Çalışma Sayfasını Kaldırmak

Sayfa Dizinini Kullanarak Kullanma

Aşağıdaki kod, GridWorksheetCollection’ın RemoveAt metodunda sayfa indeksini belirterek bir çalışma sayfasının nasıl kaldırılacağını gösterir.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
if (GridWeb1.WorkSheets.Count > 2)
{
// Removing a worksheet using its index
GridWeb1.WorkSheets.RemoveAt(1);
}

Sayfa Adını Kullanma

Aşağıdaki kod, GridWorksheetCollection’ın RemoveAt metodunda sayfa adını belirterek bir çalışma sayfasının nasıl kaldırılacağını gösterir.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Removing a worksheet using its name
if (GridWeb1.WorkSheets["Teachers"] != null)
{
GridWeb1.WorkSheets.RemoveAt("Teachers");
}