移动工作表
Contents
[
Hide
]
Aspose.Cells.GridDesktop支持在工作簿内移动工作表。
在工作簿内移动工作表
Aspose.Cells.GridDesktop提供了一个方法Aspose.Cells.GridDesktop.WorksheetCollection.MoveTo(),用于将工作表移动到指定的索引。它以源工作表和目标工作表的索引(以零为基数)作为参数。这基本上用于将工作表移动到同一电子表格中的另一个位置。
以下示例显示了如何将工作表移动到工作簿内的另一个位置。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Move the 2nd worksheet to 4th position. | |
gridDesktop1.Worksheets.MoveTo(1, 3); |