文檔金喜正規(guī)買球>>Spread Studio for .NET使用教程>>Spread Studio for .NET使用教程:移動工作表
Spread Studio for .NET使用教程:移動工作表
如果有多個工作表,可以將一個工作表進(jìn)行移動。如果把第一片放到最后一頁的位置,那么其它工作表就會移動到左邊。如果將一個工作移動到旁邊的另一款工作表,那么這種行為方式類似于交換。這個表索引 是以0為基數(shù)。使用工作表指數(shù)指定位置。不改變工作表的名字移動工作表。
FpSpread類的AllowSheetMove屬性可以被設(shè)置為true,以允許用戶使用工作表標(biāo)簽移動工作表。你也可以隱藏一個工作表。
》》》免費(fèi)下載使用Spread Studio for .NET最新版
移動一個現(xiàn)有工作表,需要完成以下指令。
使用快捷方式:
調(diào)用Sheets移動方法(將工作表從一個位置移動到另一個位置)。
示例:
這個示例代碼將吧第二個表移動到第三個工作表的位置。
C#
// Move sheet 2 to the location of sheet 3. FpSpread1.Sheets.Count = 5; FpSpread1.Sheets.Move(2, 3);
VB
' Move sheet 2 to the location of sheet 3. FpSpread1.Sheets.Count = 5 FpSpread1.Sheets.Move(2, 3)