Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

XL.Book.ErrorCode

Queries the last error code.

Component Version macOS Windows Linux Server iOS SDK
XL 16.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.Book.ErrorCode"; BookRef )   More

Parameters

Parameter Description Example
BookRef The reference number for the workbook. $ref

Result

Returns number or error.

Description

Queries the last error code.
Possible values:

ConstantValueDescription
ERRCODE_OK0Everything was fine.
ERRCODE_INCORRECTPASSWORD1Incorrect password for encrypted workbook.
ERRCODE_ROWOUTOFRANGE2Row is out of range.
ERRCODE_COLOUTOFRANGE3Column is out of range.
ERRCODE_INDEXOUTOFRANGE4Index is out of range.
ERRCODE_INDEXNOSENSE5Indexes are meaningless for this function.
ERRCODE_LASTSHEET6Workbook must contain at least one visible worksheet.
ERRCODE_SHEETNOTFOUND7Sheet is not found.
ERRCODE_NAMECUTOFF8Name was truncated.
ERRCODE_FORMULASYNTAXERROR9Error in formula expression.
ERRCODE_SHEETNAMEINVALID10Sheet name has an invalid character.
ERRCODE_FILENAMEINVALID11File name can't be NULL.
ERRCODE_NAMEALREADYEXIST12Workbook already contains such a sheet name.
ERRCODE_FILENOTAVAILABLE13Can't open file or path is incorrect.
ERRCODE_FILEFORMATNOTSUPPORTED14File isn't an Excel file or it is not supported.
ERRCODE_FUNCNOTSUPPORTEDFORXLS15This function is not supported for xls files.
ERRCODE_FUNCNOTSUPPORTEDFORXLSX16This function is not supported for xlsx files.
ERRCODE_LOADEDONLYINFO17Only workbook information was loaded.
ERRCODE_FONTSIZEOUTOFRANGE18Font size is out of range.
ERRCODE_NOFONTS19Workbook doesn't have fonts.
ERRCODE_STRINGTOOLONG20String is too long.
ERRCODE_STRINGNULL21String is NULL.
ERRCODE_AUTOFILTERNULL22AutoFilter can't be NULL.
ERRCODE_OUTLINELEVELEXCEEDED23Exceeded outline level for groups.
ERRCODE_LOCALEERROR24Can't apply the specified locale.
ERRCODE_XMLERROR25Workbook is corrupted, error in XML.
ERRCODE_BIFFRECERROR26Workbook is corrupted, error in BIFF record.
ERRCODE_IOERROR27Can't read or write.
ERRCODE_CONSISTENCYERROR28Data inconsistency was found.
ERRCODE_OUTOFMEMORY29Not enough memory.
ERRCODE_UNKNOWNSTYLE30Unknown cell style.
ERRCODE_FORMATNULL31Format is NULL.
ERRCODE_FORMATNOTFOUND32Format is not found.
ERRCODE_PARENTFORMATNOTFOUND33Parent format is not found.
ERRCODE_FONTNOTFOUND34Font is not found.
ERRCODE_TABLENOTFOUND35Table is not found.
ERRCODE_RICHSTRINGNOTFOUND36Rich string is not found.
ERRCODE_PROPNOTFOUND37Property is not found.
ERRCODE_UNKNOWNCHAR38Found an unknown character that can't be processed.
ERRCODE_CHARNOTALLOWED39Some particular symbols are not allowed here.
ERRCODE_CELLNOTFOUND40Cell is not found.
ERRCODE_CELLNOTMERGED41Cell is not in merged cells.
ERRCODE_CELLTYPEINCORRECT42Cell doesn't contain the requested type.
ERRCODE_HEIGHTTOOHIGH43Height is too big.
ERRCODE_PICERROR44Picture is corrupted or it has unknown format.
ERRCODE_PICPOSERROR45Incorrect picture position.
ERRCODE_PICNOTFOUND46Picture is not found.
ERRCODE_PICSIZEINCORRECT47Incorrect picture size.
ERRCODE_PICOFFSETEXCEED_XY48Picture offset_x and offset_y exceed cell's size.
ERRCODE_PICOFFSETEXCEED_Y49Picture offset_y exceeds cell's height.
ERRCODE_PICOFFSETEXCEED_X50Picture offset_x exceeds cell's width.
ERRCODE_NOFREECOLORINDEX51There is no free color index for xls format.
ERRCODE_COLORINVALID52Color is invalid.
ERRCODE_PRINTTITLESNOTFOUND53Print titles are not found.
ERRCODE_NAMEDRANGENOTFOUND54Named range is not found.
ERRCODE_NAMEDRANGESKIPPED55Some parts of named range were skipped.
ERRCODE_PAGEBREAKALREADYEXIST56Page break already exists.
ERRCODE_PAGEBREAKNOTFOUND57Page break is not found.
ERRCODE_PAGEBREAKLIMIT58Number of page breaks exceeds the limit.
ERRCODE_IGNOREDERRALREADYEXIST59Ignored error already exists.
ERRCODE_OVERLAP60Range overlap was detected.
ERRCODE_SHEETNOTSPLITTED61Worksheet is not splitted.
ERRCODE_DIRENTRYINCORRECTNAME62Found an incorrect name in the directory entry inside xls file.
ERRCODE_REFINVALID63Reference has unrecognized format.
ERRCODE_REFNOTFOUND64Reference is not found.
ERRCODE_DATEINVALID65Date is not recognized.
ERRCODE_XLSERROR66XLS file is corrupted.
ERRCODE_CONVERROR67String conversion error, probably incorrect locale.
ERRCODE_TOOMANYFORMATS68Too many cell formats.
ERRCODE_TOOMANYFONTS69Too many fonts.
ERRCODE_NOSTYLES70Styles are not found.
ERRCODE_NOID71ID is not found.
ERRCODE_FILTERCOLUMNNULL72Filter column is NULL.
ERRCODE_FILTERVALUENOTFOUND73Filter value is not found.
ERRCODE_FILTERNOTFOUND74Filter is not found.
ERRCODE_DATAVALIDNOTFOUND75Data validations are not found.
ERRCODE_ACTIVECELLNOTFOUND76Active cell is not found.
ERRCODE_HYPERLINKNOTFOUND77Cell doesn't have a hyperlink.
ERRCODE_SORTNOTFOUND78Sorting in AutoFilter is not found.
ERRCODE_CONTROLNOTFOUND79Control is not found.
ERRCODE_AUTOFITERROR80Can't calculate the cell's width.
ERRCODE_VALUEOUTOFRANGE81Value is out of range.
ERRCODE_ZIPERROR82ZIP library error.
ERRCODE_EXCEPTION83STL exception error.
ERRCODE_TRIALLIMIT84Limitations of the trial version.

Release notes

  • Version 16.1
    • Added XL.Book.Clear and XL.Book.ErrorCode functions.

Blog Entries

Created 20th January 2026, last changed 20th January 2026


XL.Book.DeleteSheetsExcept - XL.Book.FontCount