Lägga till eller infoga en rad i arbetsbladet

Lägga till en rad i arbetsbladet

För att lägga till en ny rad i kalkylbladet, följ stegen nedan:

  • Lägg till Aspose.Cells.GridDesktop-kontroll till dinForm
  • Få åtkomst till alla önskadeArbetsblad
  • Lägg tillRad tillArbetsblad

Infoga en rad i arbetsbladet

För att infoga en ny rad i kalkylbladet på en angiven plats, följ stegen nedan:

  • Lägg till Aspose.Cells.GridDesktop-kontroll till dinForm
  • Få åtkomst till alla önskadeArbetsblad
  • Föra inRad in iArbetsblad(vid en specifik position genom att ange indexet för raden där det ska infogas)
 // Accessing first worksheet of the Grid

Aspose.Cells.GridDesktop.Worksheet sheet = gridDesktop1.Worksheets[0];

// Inserting row to the worksheet to the first position.

sheet.Cells.InsertRow(0);