ワークシートへの行の追加または挿入

ワークシートへの行の追加

ワークシートに新しい行を追加するには、次の手順に従ってください。

  • Aspose.Cells.GridDesktop コントロールを
  • 任意のアクセスワークシート
  • 追加ワークシート
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Accessing first worksheet of the Grid
Worksheet sheet = gridDesktop1.Worksheets[0];
// Adding row to the worksheet
sheet.AddRow();

ワークシートへの行の挿入

ワークシートの指定した位置に新しい行を挿入するには、次の手順に従ってください。

  • Aspose.Cells.GridDesktop コントロールを
  • 任意のアクセスワークシート
  • 入れるの中へワークシート(挿入する行のインデックスを指定して特定の位置に)
 // 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);