/// <summary> /// Moves the source worksheet to the end of the worksheets collection /// </summary> /// <param name="sourcePositionId">The position of the source worksheet</param> public void MoveToEnd(int sourcePositionId) { MoveSheetXmlNode.RearrangeWorksheets(this, sourcePositionId, Count - 1 + _pck._worksheetAdd, false); }
/// <summary> /// Moves the source worksheet to the start of the worksheets collection /// </summary> /// <param name="sourcePositionId">The position of the source worksheet</param> public void MoveToStart(int sourcePositionId) { MoveSheetXmlNode.RearrangeWorksheets(this, sourcePositionId, _pck._worksheetAdd, true); }
/// <summary> /// Moves the source worksheet to the position after the target worksheet /// </summary> /// <param name="sourceName">The name of the source worksheet</param> /// <param name="targetName">The name of the target worksheet</param> public void MoveAfter(string sourceName, string targetName) { MoveSheetXmlNode.RearrangeWorksheets(this, sourceName, targetName, false); }
/// <summary> /// Moves the source worksheet to the position after the target worksheet /// </summary> /// <param name="sourcePositionId">The id of the source worksheet</param> /// <param name="targetPositionId">The id of the target worksheet</param> public void MoveAfter(int sourcePositionId, int targetPositionId) { MoveSheetXmlNode.RearrangeWorksheets(this, sourcePositionId, targetPositionId, true); }
//#region Move worksheet functions /// <summary> /// Moves the source worksheet to the position before the target worksheet /// </summary> /// <param name="sourceName">The name of the source worksheet</param> /// <param name="targetName">The name of the target worksheet</param> public void MoveBefore(string sourceName, string targetName) { MoveSheetXmlNode.RearrangeWorksheets(this, sourceName, targetName, true); }