Click or drag to resize
NanoXLSX

WorksheetGetUnusedWorksheetName Method

Determines the next unused worksheet name in the passed workbook

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.4+e304ab0274fa680d1e83f83c8f76c3bd5a54caf2
Syntax
C#
private static string GetUnusedWorksheetName(
	string name,
	Workbook workbook
)

Parameters

name  String
Original name to start the check
workbook  Workbook
Workbook to look for existing worksheets

Return Value

String
Not yet used worksheet name
Exceptions
ExceptionCondition
WorksheetExceptionA WorksheetException is thrown if the workbook reference is null, since all worksheets have to be considered during sanitation
Remarks
The 'rare' case where 10^31 Worksheets exists (leads to a crash) is deliberately not handled, since such a number of sheets would consume at least one quintillion bytes of RAM... what is vastly out of the 64 bit range
See Also