InsertAsNewWorksheet

SpreadsheetSaveOptions.InsertAsNewWorksheet property

Boolean flag, which specifies whether edited worksheet should replace the existing worksheet in original spreadsheet on the position, specified by the WorksheetNumber property, or it should be injected between existing worksheet and previous one, without replacing its content. By default is false — existing worksheet will be replaced. This property is ignored, if value of WorksheetNumber property is set to ‘0’.

public bool InsertAsNewWorksheet { get; set; }

Remarks

By default worksheet is replaced. This means that if given spreadsheet has 5 worksheets, and WorksheetNumber=4, then 4th worksheet will be replaced with the new edited worksheet, while the total amount of worksheets in spreadsheet (5) will remain untouched. However, if value of this property is set to true, the new edited worksheet will be injected as 4th worksheet, and all subsequent worksheets will be shifted to the end: “old” 4th worksheet becomes 5th, and 5th becomes 6th, and the total amount of worksheets in spreadsheet will be incremented by one and equal to 6.

See Also