在工作表中添加或插入列

向工作表添加列

要向工作表添加新列,请按照以下步骤操作:

  • 将 Aspose.Cells.GridDesktop 控件添加到您的形式
  • 访问任何想要的工作表
  • 添加柱子工作表

在工作表中插入一列

要在工作表的指定位置插入新列,请按照以下步骤操作:

  • 将 Aspose.Cells.GridDesktop 控件添加到您的形式
  • 访问任何想要的工作表
  • 插入柱子进入工作表 (通过指定插入列的索引在特定位置)
 // Accessing first worksheet of the Grid

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

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

sheet.Cells.InsertColumn(0);