移动工作表
Contents
[
Hide
]
Aspose.Cells.GridDesktop支持在工作簿中移动工作表。
在工作簿中移动工作表
Aspose.Cells.GridDesktop 提供了一个方法,Aspose.Cells.GridDesktop.WorksheetCollection.MoveTo(),用于将工作表移动到指定的索引处。它以源工作表和目标工作表的索引(从零开始)作为参数。它基本上用于将工作表移动到同一电子表格中的另一个位置。
下面的示例演示如何将工作表移动到工作簿中的另一个位置。
This file contains 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); |