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.3+98f265239ae8df4639650ecd7029244cc5e52dfc
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