#include "types.h"
#include "common.h"
#include "Autofilter.h"
#include "Book.h"
#include "FilterColumn.h"
#include "Format.h"
#include "Font.h"
#include "FormControl.h"
#include "RichString.h"
#include "Sheet.h"

ErlNifResourceType* TypeOfBook;

ErlNifResourceType* TypeOfSheet;

ErlNifResourceType* TypeOfFormat;

ErlNifResourceType* TypeOfFont;

ErlNifResourceType* TypeOfRichString;

ErlNifResourceType* TypeOfAutofilter;

ErlNifResourceType* TypeOfFilterColumn;

ErlNifResourceType* TypeOfFormControl;

static int load(ErlNifEnv* caller_env, void** priv_data, ERL_NIF_TERM load_info) {
	TypeOfBook = enif_open_resource_type(caller_env, NULL, "Book", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfSheet = enif_open_resource_type(caller_env, NULL, "Sheet", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfFormat = enif_open_resource_type(caller_env, NULL, "Format", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfFont = enif_open_resource_type(caller_env, NULL, "Font", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfRichString = enif_open_resource_type(caller_env, NULL, "RichString", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfAutofilter = enif_open_resource_type(caller_env, NULL, "Autofilter", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfFilterColumn = enif_open_resource_type(caller_env, NULL, "FilterColumn", NULL, ERL_NIF_RT_CREATE, NULL);

	TypeOfFormControl = enif_open_resource_type(caller_env, NULL, "FormControl", NULL, ERL_NIF_RT_CREATE, NULL);

	return 0;
}

static ErlNifFunc nif_funcs[] =
{
	// ========================================================================================================================================================

	// int xlAutoFilterGetRef(AutoFilterHandle handle, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlAutoFilterGetRef", 1, c_xlAutoFilterGetRef },
	// void xlAutoFilterSetRef(AutoFilterHandle handle, int rowFirst, int rowLast, int colFirst, int colLast);
	{ "xlAutoFilterSetRef", 5, c_xlAutoFilterSetRef },
	// FilterColumnHandle xlAutoFilterColumn(AutoFilterHandle handle, int colId);
	{ "xlAutoFilterColumn", 2, c_xlAutoFilterColumn },
	// int xlAutoFilterColumnSize(AutoFilterHandle handle);
	{ "xlAutoFilterColumnSize", 1, c_xlAutoFilterColumnSize },
	// FilterColumnHandle xlAutoFilterColumnByIndex(AutoFilterHandle handle, int index);
	{ "xlAutoFilterColumnByIndex", 2, c_xlAutoFilterColumnByIndex },
	// int xlAutoFilterGetSortRange(AutoFilterHandle handle, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlAutoFilterGetSortRange", 1, c_xlAutoFilterGetSortRange },
	// int xlAutoFilterGetSort(AutoFilterHandle handle, int* columnIndex, int* descending);
	{ "xlAutoFilterGetSort", 1, c_xlAutoFilterGetSort },
	// int xlAutoFilterSetSort(AutoFilterHandle handle, int columnIndex, int descending);
	{ "xlAutoFilterSetSort", 3, c_xlAutoFilterSetSort },
	// int xlAutoFilterAddSort(AutoFilterHandle handle, int columnIndex, int descending);
	{ "xlAutoFilterAddSort", 3, c_xlAutoFilterAddSort },

	// ========================================================================================================================================================

	// BookHandle xlCreateBook(void);
	{ "xlCreateBook", 0, c_xlCreateBook },
	// BookHandle xlCreateXMLBook(void);
	{ "xlCreateXMLBook", 0, c_xlCreateXMLBook },
	// int xlBookLoad(BookHandle handle, const wchar_t* filename);
	{ "xlBookLoad", 2, c_xlBookLoad },
	// int xlBookSave(BookHandle handle, const wchar_t* filename);
	{ "xlBookSave", 2, c_xlBookSave },
	// int xlBookLoadUsingTempFile(BookHandle handle, const wchar_t* filename, const wchar_t* tempFile);
	{ "xlBookLoadUsingTempFile", 3, c_xlBookLoadUsingTempFile },
	// int xlBookSaveUsingTempFile(BookHandle handle, const wchar_t* filename, int useTempFile);
	{ "xlBookSaveUsingTempFile", 3, c_xlBookSaveUsingTempFile },
	// int xlBookLoadPartially(BookHandle handle, const wchar_t* filename, int sheetIndex, int firstRow, int lastRow, int keepAllSheets);
	{ "xlBookLoadPartially", 6, c_xlBookLoadPartially },
	// int xlBookLoadPartiallyUsingTempFile(BookHandle handle, const wchar_t* filename, int sheetIndex, int firstRow, int lastRow, const wchar_t* tempFile, int keepAllSheets);
	{ "xlBookLoadPartiallyUsingTempFile", 7, c_xlBookLoadPartiallyUsingTempFile },
	// int xlBookLoadWithoutEmptyCells(BookHandle handle, const wchar_t* filename);
	{ "xlBookLoadWithoutEmptyCells", 2, c_xlBookLoadWithoutEmptyCells },
	// int xlBookLoadInfo(BookHandle handle, const wchar_t* filename);
	{ "xlBookLoadInfo", 2, c_xlBookLoadInfo },
	// int xlBookLoadRaw(BookHandle handle, const char* data, unsigned size);
	{ "xlBookLoadRaw", 3, c_xlBookLoadRaw },
	// int xlBookLoadRawPartially(BookHandle handle, const char* data, unsigned size, int sheetIndex, int firstRow, int lastRow, int keepAllSheets);
	{ "xlBookLoadRawPartially", 7, c_xlBookLoadRawPartially },
	// int xlBookSaveRaw(BookHandle handle, const char** data, unsigned* size);
	{ "xlBookSaveRaw", 1, c_xlBookSaveRaw },
	// heetHandle xlBookAddSheet(BookHandle handle, const wchar_t* name, SheetHandle initSheet);
	{ "xlBookAddSheet", 3, c_xlBookAddSheet },
	// heetHandle xlBookInsertSheet(BookHandle handle, int index, const wchar_t* name, SheetHandle initSheet);
	{ "xlBookInsertSheet", 4, c_xlBookInsertSheet },
	// heetHandle xlBookGetSheet(BookHandle handle, int index);
	{ "xlBookGetSheet", 2, c_xlBookGetSheet },
	// t wchar_t* xlBookGetSheetName(BookHandle handle, int index);
	{ "xlBookGetSheetName", 2, c_xlBookGetSheetName },
	// int xlBookSheetType(BookHandle handle, int index);
	{ "xlBookSheetType", 2, c_xlBookSheetType },
	// int xlBookMoveSheet(BookHandle handle, int srcIndex, int dstIndex);
	{ "xlBookMoveSheet", 3, c_xlBookMoveSheet },
	// int xlBookDelSheet(BookHandle handle, int index);
	{ "xlBookDelSheet", 2, c_xlBookDelSheet },
	// int xlBookSheetCount(BookHandle handle);
	{ "xlBookSheetCount", 1, c_xlBookSheetCount },
	// rmatHandle xlBookAddFormat(BookHandle handle, FormatHandle initFormat);
	{ "xlBookAddFormat", 2, c_xlBookAddFormat },
	// FontHandle xlBookAddFont(BookHandle handle, FontHandle initFont);
	{ "xlBookAddFont", 2, c_xlBookAddFont },
	// StringHandle xlBookAddRichString(BookHandle handle);
	{ "xlBookAddRichString", 1, c_xlBookAddRichString },
	// int xlBookAddCustomNumFormat(BookHandle handle, const wchar_t* customNumFormat);
	{ "xlBookAddCustomNumFormat", 2, c_xlBookAddCustomNumFormat },
	// t wchar_t* xlBookCustomNumFormat(BookHandle handle, int fmt);
	{ "xlBookCustomNumFormat", 2, c_xlBookCustomNumFormat },
	// rmatHandle xlBookFormat(BookHandle handle, int index);
	{ "xlBookFormat", 2, c_xlBookFormat },
	// int xlBookFormatSize(BookHandle handle);
	{ "xlBookFormatSize", 1, c_xlBookFormatSize },
	// FontHandle xlBookFont(BookHandle handle, int index);
	{ "xlBookFont", 2, c_xlBookFont },
	// int xlBookFontSize(BookHandle handle);
	{ "xlBookFontSize", 1, c_xlBookFontSize },
	// double xlBookDatePack(BookHandle handle, int year, int month, int day, int hour, int min, int sec, int msec);
	{ "xlBookDatePack", 8, c_xlBookDatePack },
	// int xlBookDateUnpack(BookHandle handle, double value, int* year, int* month, int* day, int* hour, int* min, int* sec, int* msec);
	{ "xlBookDateUnpack", 2, c_xlBookDateUnpack },
	// int xlBookColorPack(BookHandle handle, int red, int green, int blue);
	{ "xlBookColorPack", 4, c_xlBookColorPack },
	// void xlBookColorUnpack(BookHandle handle, int color, int* red, int* green, int* blue);
	{ "xlBookColorUnpack", 2, c_xlBookColorUnpack },
	// int xlBookActiveSheet(BookHandle handle);
	{ "xlBookActiveSheet", 1, c_xlBookActiveSheet },
	// void xlBookSetActiveSheet(BookHandle handle, int index);
	{ "xlBookSetActiveSheet", 2, c_xlBookSetActiveSheet },
	// int xlBookPictureSize(BookHandle handle);
	{ "xlBookPictureSize", 1, c_xlBookPictureSize },
	// int xlBookGetPicture(BookHandle handle, int index, const char** data, unsigned* size);
	{ "xlBookGetPicture", 2, c_xlBookGetPicture },
	// int xlBookAddPicture(BookHandle handle, const wchar_t* filename);
	{ "xlBookAddPicture", 2, c_xlBookAddPicture },
	// int xlBookAddPicture2(BookHandle handle, const char* data, unsigned size);
	{ "xlBookAddPicture2", 3, c_xlBookAddPicture2 },
	// int xlBookAddPictureAsLink(BookHandle handle, const wchar_t* filename, int insert);
	{ "xlBookAddPictureAsLink", 3, c_xlBookAddPictureAsLink },
	// t wchar_t* xlBookDefaultFont(BookHandle handle, int* fontSize);
	{ "xlBookDefaultFont", 1, c_xlBookDefaultFont },
	// void xlBookSetDefaultFont(BookHandle handle, const wchar_t* fontName, int fontSize);
	{ "xlBookSetDefaultFont", 3, c_xlBookSetDefaultFont },
	// int xlBookRefR1C1(BookHandle handle);
	{ "xlBookRefR1C1", 1, c_xlBookRefR1C1 },
	// void xlBookSetRefR1C1(BookHandle handle, int refR1C1);
	{ "xlBookSetRefR1C1", 2, c_xlBookSetRefR1C1 },
	// void xlBookSetKey(BookHandle handle, const wchar_t* name, const wchar_t* key);
	{ "xlBookSetKey", 3, c_xlBookSetKey },
	// int xlBookRgbMode(BookHandle handle);
	{ "xlBookRgbMode", 1, c_xlBookRgbMode },
	// void xlBookSetRgbMode(BookHandle handle, int rgbMode);
	{ "xlBookSetRgbMode", 2, c_xlBookSetRgbMode },
	// int xlBookCalcMode(BookHandle handle);
	{ "xlBookCalcMode", 1, c_xlBookCalcMode },
	// void xlBookSetCalcMode(BookHandle handle, int calcMode);
	{ "xlBookSetCalcMode", 2, c_xlBookSetCalcMode },
	// int xlBookVersion(BookHandle handle);
	{ "xlBookVersion", 1, c_xlBookVersion },
	// int xlBookBiffVersion(BookHandle handle);
	{ "xlBookBiffVersion", 1, c_xlBookBiffVersion },
	// int xlBookIsDate1904(BookHandle handle);
	{ "xlBookIsDate1904", 1, c_xlBookIsDate1904 },
	// void xlBookSetDate1904(BookHandle handle, int date1904);
	{ "xlBookSetDate1904", 2, c_xlBookSetDate1904 },
	// int xlBookIsTemplate(BookHandle handle);
	{ "xlBookIsTemplate", 1, c_xlBookIsTemplate },
	// void xlBookSetTemplate(BookHandle handle, int tmpl);
	{ "xlBookSetTemplate", 2, c_xlBookSetTemplate },
	// int xlBookSetLocale(BookHandle handle, const char* locale);
	{ "xlBookSetLocale", 2, c_xlBookSetLocale },
	// onst char* xlBookErrorMessage(BookHandle handle);
	{ "xlBookErrorMessage", 1, c_xlBookErrorMessage },
	// void xlBookRelease(BookHandle handle);
	{ "xlBookRelease", 1, c_xlBookRelease },
	// ========================================================================================================================================================

	// int xlFilterColumnIndex(FilterColumnHandle handle);
	{ "xlFilterColumnIndex", 1, c_xlFilterColumnIndex },
	// int xlFilterColumnFilterType(FilterColumnHandle handle);
	{ "xlFilterColumnFilterType", 1, c_xlFilterColumnFilterType },
	// int xlFilterColumnFilterSize(FilterColumnHandle handle);
	{ "xlFilterColumnFilterSize", 1, c_xlFilterColumnFilterSize },
	// const wchar_t* xlFilterColumnFilter(FilterColumnHandle handle, int index);
	{ "xlFilterColumnFilter", 2, c_xlFilterColumnFilter },
	// void xlFilterColumnAddFilter(FilterColumnHandle handle, const wchar_t* value);
	{ "xlFilterColumnAddFilter", 2, c_xlFilterColumnAddFilter },
	// int xlFilterColumnGetTop10(FilterColumnHandle handle, double* value, int* top, int* percent);
	{ "xlFilterColumnGetTop10", 1, c_xlFilterColumnGetTop10 },
	// void xlFilterColumnSetTop10(FilterColumnHandle handle, double value, int top, int percent);
	{ "xlFilterColumnSetTop10", 4, c_xlFilterColumnSetTop10 },
	// int xlFilterColumnGetCustomFilter(FilterColumnHandle handle, int* op1, const wchar_t** v1, int* op2, const wchar_t** v2, int* andOp);
	{ "xlFilterColumnGetCustomFilter", 1, c_xlFilterColumnGetCustomFilter },
	// void xlFilterColumnSetCustomFilter(FilterColumnHandle handle, int op, const wchar_t* val);
	{ "xlFilterColumnSetCustomFilter", 3, c_xlFilterColumnSetCustomFilter },
	// void xlFilterColumnSetCustomFilterEx(FilterColumnHandle handle, int op1, const wchar_t* v1, int op2, const wchar_t* v2, int andOp);
	{ "xlFilterColumnSetCustomFilterEx", 6, c_xlFilterColumnSetCustomFilterEx },
	// void xlFilterColumnClear(FilterColumnHandle handle);
	{ "xlFilterColumnClear", 1, c_xlFilterColumnClear },

	// ========================================================================================================================================================

	// int xlFontSize(FontHandle handle);
	{ "xlFontSize", 1, c_xlFontSize },
	// void xlFontSetSize(FontHandle handle, int size);
	{ "xlFontSetSize", 2, c_xlFontSetSize },
	// int xlFontItalic(FontHandle handle);
	{ "xlFontItalic", 1, c_xlFontItalic },
	// void xlFontSetItalic(FontHandle handle, int italic);
	{ "xlFontSetItalic", 2, c_xlFontSetItalic },
	// int xlFontStrikeOut(FontHandle handle);
	{ "xlFontStrikeOut", 1, c_xlFontStrikeOut },
	// void xlFontSetStrikeOut(FontHandle handle, int strikeOut);
	{ "xlFontSetStrikeOut", 2, c_xlFontSetStrikeOut },
	// int xlFontColor(FontHandle handle);
	{ "xlFontColor", 1, c_xlFontColor },
	// void xlFontSetColor(FontHandle handle, int color);
	{ "xlFontSetColor", 2, c_xlFontSetColor },
	// int xlFontBold(FontHandle handle);
	{ "xlFontBold", 1, c_xlFontBold },
	// void xlFontSetBold(FontHandle handle, int bold);
	{ "xlFontSetBold", 2, c_xlFontSetBold },
	// int xlFontScript(FontHandle handle);
	{ "xlFontScript", 1, c_xlFontScript },
	// void xlFontSetScript(FontHandle handle, int script);
	{ "xlFontSetScript", 2, c_xlFontSetScript },
	// int xlFontUnderline(FontHandle handle);
	{ "xlFontUnderline", 1, c_xlFontUnderline },
	// void xlFontSetUnderline(FontHandle handle, int underline);
	{ "xlFontSetUnderline", 2, c_xlFontSetUnderline },
	// const wchar_t* xlFontName(FontHandle handle);
	{ "xlFontName", 1, c_xlFontName },
	// void xlFontSetName(FontHandle handle, const wchar_t* name);
	{ "xlFontSetName", 2, c_xlFontSetName },

	// ========================================================================================================================================================

	// FontHandle xlFormatFont(FormatHandle handle);
	{ "xlFormatFont", 1, c_xlFormatFont },
	// int xlFormatSetFont(FormatHandle handle, FontHandle fontHandle);
	{ "xlFormatSetFont", 2, c_xlFormatSetFont },
	// int xlFormatNumFormat(FormatHandle handle);
	{ "xlFormatNumFormat", 1, c_xlFormatNumFormat },
	// void xlFormatSetNumFormat(FormatHandle handle, int numFormat);
	{ "xlFormatSetNumFormat", 2, c_xlFormatSetNumFormat },
	// int xlFormatAlignH(FormatHandle handle);
	{ "xlFormatAlignH", 1, c_xlFormatAlignH },
	// void xlFormatSetAlignH(FormatHandle handle, int align);
	{ "xlFormatSetAlignH", 2, c_xlFormatSetAlignH },
	// int xlFormatAlignV(FormatHandle handle);
	{ "xlFormatAlignV", 1, c_xlFormatAlignV },
	// void xlFormatSetAlignV(FormatHandle handle, int align);
	{ "xlFormatSetAlignV", 2, c_xlFormatSetAlignV },
	// int xlFormatWrap(FormatHandle handle);
	{ "xlFormatWrap", 1, c_xlFormatWrap },
	// void xlFormatSetWrap(FormatHandle handle, int wrap);
	{ "xlFormatSetWrap", 2, c_xlFormatSetWrap },
	// int xlFormatRotation(FormatHandle handle);
	{ "xlFormatRotation", 1, c_xlFormatRotation },
	// int xlFormatSetRotation(FormatHandle handle, int rotation);
	{ "xlFormatSetRotation", 2, c_xlFormatSetRotation },
	// int xlFormatIndent(FormatHandle handle);
	{ "xlFormatIndent", 1, c_xlFormatIndent },
	// void xlFormatSetIndent(FormatHandle handle, int indent);
	{ "xlFormatSetIndent", 2, c_xlFormatSetIndent },
	// int xlFormatShrinkToFit(FormatHandle handle);
	{ "xlFormatShrinkToFit", 1, c_xlFormatShrinkToFit },
	// void xlFormatSetShrinkToFit(FormatHandle handle, int shrinkToFit);
	{ "xlFormatSetShrinkToFit", 2, c_xlFormatSetShrinkToFit },
	// void xlFormatSetBorder(FormatHandle handle, int style);
	{ "xlFormatSetBorder", 2, c_xlFormatSetBorder },
	// void xlFormatSetBorderColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderColor", 2, c_xlFormatSetBorderColor },
	// int xlFormatBorderLeft(FormatHandle handle);
	{ "xlFormatBorderLeft", 1, c_xlFormatBorderLeft },
	// void xlFormatSetBorderLeft(FormatHandle handle, int style);
	{ "xlFormatSetBorderLeft", 2, c_xlFormatSetBorderLeft },
	// int xlFormatBorderRight(FormatHandle handle);
	{ "xlFormatBorderRight", 1, c_xlFormatBorderRight },
	// void xlFormatSetBorderRight(FormatHandle handle, int style);
	{ "xlFormatSetBorderRight", 2, c_xlFormatSetBorderRight },
	// int xlFormatBorderTop(FormatHandle handle);
	{ "xlFormatBorderTop", 1, c_xlFormatBorderTop },
	// void xlFormatSetBorderTop(FormatHandle handle, int style);
	{ "xlFormatSetBorderTop", 2, c_xlFormatSetBorderTop },
	// int xlFormatBorderBottom(FormatHandle handle);
	{ "xlFormatBorderBottom", 1, c_xlFormatBorderBottom },
	// void xlFormatSetBorderBottom(FormatHandle handle, int style);
	{ "xlFormatSetBorderBottom", 2, c_xlFormatSetBorderBottom },
	// int xlFormatBorderLeftColor(FormatHandle handle);
	{ "xlFormatBorderLeftColor", 1, c_xlFormatBorderLeftColor },
	// void xlFormatSetBorderLeftColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderLeftColor", 2, c_xlFormatSetBorderLeftColor },
	// int xlFormatBorderRightColor(FormatHandle handle);
	{ "xlFormatBorderRightColor", 1, c_xlFormatBorderRightColor },
	// void xlFormatSetBorderRightColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderRightColor", 2, c_xlFormatSetBorderRightColor },
	// int xlFormatBorderTopColor(FormatHandle handle);
	{ "xlFormatBorderTopColor", 1, c_xlFormatBorderTopColor },
	// void xlFormatSetBorderTopColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderTopColor", 2, c_xlFormatSetBorderTopColor },
	// int xlFormatBorderBottomColor(FormatHandle handle);
	{ "xlFormatBorderBottomColor", 1, c_xlFormatBorderBottomColor },
	// void xlFormatSetBorderBottomColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderBottomColor", 2, c_xlFormatSetBorderBottomColor },
	// int xlFormatBorderDiagonal(FormatHandle handle);
	{ "xlFormatBorderDiagonal", 1, c_xlFormatBorderDiagonal },
	// void xlFormatSetBorderDiagonal(FormatHandle handle, int border);
	{ "xlFormatSetBorderDiagonal", 2, c_xlFormatSetBorderDiagonal },
	// int xlFormatBorderDiagonalStyle(FormatHandle handle);
	{ "xlFormatBorderDiagonalStyle", 1, c_xlFormatBorderDiagonalStyle },
	// void xlFormatSetBorderDiagonalStyle(FormatHandle handle, int style);
	{ "xlFormatSetBorderDiagonalStyle", 2, c_xlFormatSetBorderDiagonalStyle },
	// int xlFormatBorderDiagonalColor(FormatHandle handle);
	{ "xlFormatBorderDiagonalColor", 1, c_xlFormatBorderDiagonalColor },
	// void xlFormatSetBorderDiagonalColor(FormatHandle handle, int color);
	{ "xlFormatSetBorderDiagonalColor", 2, c_xlFormatSetBorderDiagonalColor },
	// int xlFormatFillPattern(FormatHandle handle);
	{ "xlFormatFillPattern", 1, c_xlFormatFillPattern },
	// void xlFormatSetFillPattern(FormatHandle handle, int pattern);
	{ "xlFormatSetFillPattern", 2, c_xlFormatSetFillPattern },
	// int xlFormatPatternForegroundColor(FormatHandle handle);
	{ "xlFormatPatternForegroundColor", 1, c_xlFormatPatternForegroundColor },
	// void xlFormatSetPatternForegroundColor(FormatHandle handle, int color);
	{ "xlFormatSetPatternForegroundColor", 2, c_xlFormatSetPatternForegroundColor },
	// int xlFormatPatternBackgroundColor(FormatHandle handle);
	{ "xlFormatPatternBackgroundColor", 1, c_xlFormatPatternBackgroundColor },
	// void xlFormatSetPatternBackgroundColor(FormatHandle handle, int color);
	{ "xlFormatSetPatternBackgroundColor", 2, c_xlFormatSetPatternBackgroundColor },
	// int xlFormatLocked(FormatHandle handle);
	{ "xlFormatLocked", 1, c_xlFormatLocked },
	// void xlFormatSetLocked(FormatHandle handle, int locked);
	{ "xlFormatSetLocked", 2, c_xlFormatSetLocked },
	// int xlFormatHidden(FormatHandle handle);
	{ "xlFormatHidden", 1, c_xlFormatHidden },
	// void xlFormatSetHidden(FormatHandle handle, int hidden);
	{ "xlFormatSetHidden", 2, c_xlFormatSetHidden },

	// ========================================================================================================================================================

	// int xlFormControlObjectType(FormControlHandle handle);
	{ "xlFormControlObjectType", 1, c_xlFormControlObjectType },
	// int xlFormControlChecked(FormControlHandle handle);
	{ "xlFormControlChecked", 1, c_xlFormControlChecked },
	// void xlFormControlSetChecked(FormControlHandle handle, int checked);
	{ "xlFormControlSetChecked", 2, c_xlFormControlSetChecked },
	// const wchar_t* xlFormControlFmlaGroup(FormControlHandle handle);
	{ "xlFormControlFmlaGroup", 1, c_xlFormControlFmlaGroup },
	// void xlFormControlSetFmlaGroup(FormControlHandle handle, const wchar_t* group);
	{ "xlFormControlSetFmlaGroup", 2, c_xlFormControlSetFmlaGroup },
	// const wchar_t* xlFormControlFmlaLink(FormControlHandle handle);
	{ "xlFormControlFmlaLink", 1, c_xlFormControlFmlaLink },
	// void xlFormControlSetFmlaLink(FormControlHandle handle, const wchar_t* link);
	{ "xlFormControlSetFmlaLink", 2, c_xlFormControlSetFmlaLink },
	// const wchar_t* xlFormControlFmlaRange(FormControlHandle handle);
	{ "xlFormControlFmlaRange", 1, c_xlFormControlFmlaRange },
	// void xlFormControlSetFmlaRange(FormControlHandle handle, const wchar_t* range);
	{ "xlFormControlSetFmlaRange", 2, c_xlFormControlSetFmlaRange },
	// const wchar_t* xlFormControlFmlaTxbx(FormControlHandle handle);
	{ "xlFormControlFmlaTxbx", 1, c_xlFormControlFmlaTxbx },
	// void xlFormControlSetFmlaTxbx(FormControlHandle handle, const wchar_t* txbx);
	{ "xlFormControlSetFmlaTxbx", 2, c_xlFormControlSetFmlaTxbx },
	// const wchar_t* xlFormControlName(FormControlHandle handle);
	{ "xlFormControlName", 1, c_xlFormControlName },
	// const wchar_t* xlFormControlLinkedCell(FormControlHandle handle);
	{ "xlFormControlLinkedCell", 1, c_xlFormControlLinkedCell },
	// const wchar_t* xlFormControlListFillRange(FormControlHandle handle);
	{ "xlFormControlListFillRange", 1, c_xlFormControlListFillRange },
	// const wchar_t* xlFormControlMacro(FormControlHandle handle);
	{ "xlFormControlMacro", 1, c_xlFormControlMacro },
	// const wchar_t* xlFormControlAltText(FormControlHandle handle);
	{ "xlFormControlAltText", 1, c_xlFormControlAltText },
	// int xlFormControlLocked(FormControlHandle handle);
	{ "xlFormControlLocked", 1, c_xlFormControlLocked },
	// int xlFormControlDefaultSize(FormControlHandle handle);
	{ "xlFormControlDefaultSize", 1, c_xlFormControlDefaultSize },
	// int xlFormControlPrint(FormControlHandle handle);
	{ "xlFormControlPrint", 1, c_xlFormControlPrint },
	// int xlFormControlDisabled(FormControlHandle handle);
	{ "xlFormControlDisabled", 1, c_xlFormControlDisabled },
	// const wchar_t* xlFormControlItem(FormControlHandle handle, int index);
	{ "xlFormControlItem", 2, c_xlFormControlItem },
	// int xlFormControlItemSize(FormControlHandle handle);
	{ "xlFormControlItemSize", 1, c_xlFormControlItemSize },
	// void xlFormControlAddItem(FormControlHandle handle, const wchar_t* value);
	{ "xlFormControlAddItem", 2, c_xlFormControlAddItem },
	// void xlFormControlInsertItem(FormControlHandle handle, int index, const wchar_t* value);
	{ "xlFormControlInsertItem", 3, c_xlFormControlInsertItem },
	// void xlFormControlClearItems(FormControlHandle handle);
	{ "xlFormControlClearItems", 1, c_xlFormControlClearItems },
	// int xlFormControlDropLines(FormControlHandle handle);
	{ "xlFormControlDropLines", 1, c_xlFormControlDropLines },
	// void xlFormControlSetDropLines(FormControlHandle handle, int lines);
	{ "xlFormControlSetDropLines", 2, c_xlFormControlSetDropLines },
	// int xlFormControlDx(FormControlHandle handle);
	{ "xlFormControlDx", 1, c_xlFormControlDx },
	// void xlFormControlSetDx(FormControlHandle handle, int dx);
	{ "xlFormControlSetDx", 2, c_xlFormControlSetDx },
	// int xlFormControlFirstButton(FormControlHandle handle);
	{ "xlFormControlFirstButton", 1, c_xlFormControlFirstButton },
	// void xlFormControlSetFirstButton(FormControlHandle handle, int firstButton);
	{ "xlFormControlSetFirstButton", 2, c_xlFormControlSetFirstButton },
	// int xlFormControlHoriz(FormControlHandle handle);
	{ "xlFormControlHoriz", 1, c_xlFormControlHoriz },
	// void xlFormControlSetHoriz(FormControlHandle handle, int horiz);
	{ "xlFormControlSetHoriz", 2, c_xlFormControlSetHoriz },
	// int xlFormControlInc(FormControlHandle handle);
	{ "xlFormControlInc", 1, c_xlFormControlInc },
	// void xlFormControlSetInc(FormControlHandle handle, int inc);
	{ "xlFormControlSetInc", 2, c_xlFormControlSetInc },
	// int xlFormControlGetMax(FormControlHandle handle);
	{ "xlFormControlGetMax", 1, c_xlFormControlGetMax },
	// void xlFormControlSetMax(FormControlHandle handle, int max);
	{ "xlFormControlSetMax", 2, c_xlFormControlSetMax },
	// int xlFormControlGetMin(FormControlHandle handle);
	{ "xlFormControlGetMin", 1, c_xlFormControlGetMin },
	// void xlFormControlSetMin(FormControlHandle handle, int min);
	{ "xlFormControlSetMin", 2, c_xlFormControlSetMin },
	// const wchar_t* xlFormControlMultiSel(FormControlHandle handle);
	{ "xlFormControlMultiSel", 1, c_xlFormControlMultiSel },
	// void xlFormControlSetMultiSel(FormControlHandle handle, const wchar_t* value);
	{ "xlFormControlSetMultiSel", 2, c_xlFormControlSetMultiSel },
	// int xlFormControlSel(FormControlHandle handle);
	{ "xlFormControlSel", 1, c_xlFormControlSel },
	// void xlFormControlSetSel(FormControlHandle handle, int sel);
	{ "xlFormControlSetSel", 2, c_xlFormControlSetSel },
	// int xlFormControlFromAnchor(FormControlHandle handle, int* col, int* colOff, int* row, int* rowOff);
	{ "xlFormControlFromAnchor", 1, c_xlFormControlFromAnchor },
	// int xlFormControlToAnchor(FormControlHandle handle, int* col, int* colOff, int* row, int* rowOff);
	{ "xlFormControlToAnchor", 1, c_xlFormControlToAnchor },

	// ========================================================================================================================================================

	// int xlSheetCellType(SheetHandle handle, int row, int col);
	{ "xlSheetCellType", 3, c_xlSheetCellType },
	// int xlSheetIsFormula(SheetHandle handle, int row, int col);
	{ "xlSheetIsFormula", 3, c_xlSheetIsFormula },
	// FormatHandle xlSheetCellFormat(SheetHandle handle, int row, int col);
	{ "xlSheetCellFormat", 3, c_xlSheetCellFormat },
	// void xlSheetSetCellFormat(SheetHandle handle, int row, int col, FormatHandle format);
	{ "xlSheetSetCellFormat", 4, c_xlSheetSetCellFormat },
	// const wchar_t* xlSheetReadStr(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadStr", 3, c_xlSheetReadStr },
	// int xlSheetWriteStr(SheetHandle handle, int row, int col, const wchar_t* value, FormatHandle format);
	{ "xlSheetWriteStr", 5, c_xlSheetWriteStr },
	// int xlSheetWriteStrAsNum(SheetHandle handle, int row, int col, const wchar_t* value, FormatHandle format);
	{ "xlSheetWriteStrAsNum", 5, c_xlSheetWriteStrAsNum },
	// RichStringHandle xlSheetReadRichStr(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadRichStr", 3, c_xlSheetReadRichStr },
	// int xlSheetWriteRichStr(SheetHandle handle, int row, int col, RichStringHandle richString, FormatHandle format);
	{ "xlSheetWriteRichStr", 5, c_xlSheetWriteRichStr },
	// double xlSheetReadNum(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadNum", 3, c_xlSheetReadNum },
	// int xlSheetWriteNum(SheetHandle handle, int row, int col, double value, FormatHandle format);
	{ "xlSheetWriteNum", 5, c_xlSheetWriteNum },
	// int xlSheetReadBool(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadBool", 3, c_xlSheetReadBool },
	// int xlSheetWriteBool(SheetHandle handle, int row, int col, int value, FormatHandle format);
	{ "xlSheetWriteBool", 5, c_xlSheetWriteBool },
	// int xlSheetReadBlank(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadBlank", 3, c_xlSheetReadBlank },
	// int xlSheetWriteBlank(SheetHandle handle, int row, int col, FormatHandle format);
	{ "xlSheetWriteBlank", 4, c_xlSheetWriteBlank },
	// const wchar_t* xlSheetReadFormula(SheetHandle handle, int row, int col, FormatHandle* format);
	{ "xlSheetReadFormula", 3, c_xlSheetReadFormula },
	// int xlSheetWriteFormula(SheetHandle handle, int row, int col, const wchar_t* value, FormatHandle format);
	{ "xlSheetWriteFormula", 5, c_xlSheetWriteFormula },
	// int xlSheetWriteFormulaNum(SheetHandle handle, int row, int col, const wchar_t* expr, double value, FormatHandle format);
	{ "xlSheetWriteFormulaNum", 6, c_xlSheetWriteFormulaNum },
	// int xlSheetWriteFormulaStr(SheetHandle handle, int row, int col, const wchar_t* expr, const wchar_t* value, FormatHandle format);
	{ "xlSheetWriteFormulaStr", 6, c_xlSheetWriteFormulaStr },
	// int xlSheetWriteFormulaBool(SheetHandle handle, int row, int col, const wchar_t* expr, int value, FormatHandle format);
	{ "xlSheetWriteFormulaBool", 6, c_xlSheetWriteFormulaBool },
	// const wchar_t* xlSheetReadComment(SheetHandle handle, int row, int col);
	{ "xlSheetReadComment", 3, c_xlSheetReadComment },
	// void xlSheetWriteComment(SheetHandle handle, int row, int col, const wchar_t* value, const wchar_t* author, int width, int height);
	{ "xlSheetWriteComment", 7, c_xlSheetWriteComment },
	// void xlSheetRemoveComment(SheetHandle handle, int row, int col);
	{ "xlSheetRemoveComment", 3, c_xlSheetRemoveComment },
	// int xlSheetIsDate(SheetHandle handle, int row, int col);
	{ "xlSheetIsDate", 3, c_xlSheetIsDate },
	// int xlSheetIsRichStr(SheetHandle handle, int row, int col);
	{ "xlSheetIsRichStr", 3, c_xlSheetIsRichStr },
	// int xlSheetReadError(SheetHandle handle, int row, int col);
	{ "xlSheetReadError", 3, c_xlSheetReadError },
	// void xlSheetWriteError(SheetHandle handle, int row, int col, int error, FormatHandle format);
	{ "xlSheetWriteError", 5, c_xlSheetWriteError },
	// double xlSheetColWidth(SheetHandle handle, int col);
	{ "xlSheetColWidth", 2, c_xlSheetColWidth },
	// double xlSheetRowHeight(SheetHandle handle, int row);
	{ "xlSheetRowHeight", 2, c_xlSheetRowHeight },
	// int xlSheetColWidthPx(SheetHandle handle, int col);
	{ "xlSheetColWidthPx", 2, c_xlSheetColWidthPx },
	// int xlSheetRowHeightPx(SheetHandle handle, int row);
	{ "xlSheetRowHeightPx", 2, c_xlSheetRowHeightPx },
	// int xlSheetSetCol(SheetHandle handle, int colFirst, int colLast, double width, FormatHandle format, int hidden);
	{ "xlSheetSetCol", 6, c_xlSheetSetCol },
	// int xlSheetSetRow(SheetHandle handle, int row, double height, FormatHandle format, int hidden);
	{ "xlSheetSetRow", 5, c_xlSheetSetRow },
	// int xlSheetRowHidden(SheetHandle handle, int row);
	{ "xlSheetRowHidden", 2, c_xlSheetRowHidden },
	// int xlSheetSetRowHidden(SheetHandle handle, int row, int hidden);
	{ "xlSheetSetRowHidden", 3, c_xlSheetSetRowHidden },
	// int xlSheetColHidden(SheetHandle handle, int col);
	{ "xlSheetColHidden", 2, c_xlSheetColHidden },
	// int xlSheetSetColHidden(SheetHandle handle, int col, int hidden);
	{ "xlSheetSetColHidden", 3, c_xlSheetSetColHidden },
	// int xlSheetGetMerge(SheetHandle handle, int row, int col, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlSheetGetMerge", 3, c_xlSheetGetMerge },
	// int xlSheetSetMerge(SheetHandle handle, int rowFirst, int rowLast, int colFirst, int colLast);
	{ "xlSheetSetMerge", 5, c_xlSheetSetMerge },
	// int xlSheetDelMerge(SheetHandle handle, int row, int col);
	{ "xlSheetDelMerge", 3, c_xlSheetDelMerge },
	// int xlSheetMergeSize(SheetHandle handle);
	{ "xlSheetMergeSize", 1, c_xlSheetMergeSize },
	// int xlSheetMerge(SheetHandle handle, int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlSheetMerge", 2, c_xlSheetMerge },
	// int xlSheetDelMergeByIndex(SheetHandle handle, int index);
	{ "xlSheetDelMergeByIndex", 2, c_xlSheetDelMergeByIndex },
	// int xlSheetPictureSize(SheetHandle handle);
	{ "xlSheetPictureSize", 1, c_xlSheetPictureSize },
	// int xlSheetGetPicture(SheetHandle handle, int index, int* rowTop, int* colLeft, int* rowBottom, int* colRight, int* width, int* height, int* offset_x, int* offset_y);
	{ "xlSheetGetPicture", 2, c_xlSheetGetPicture },
	// int xlSheetRemovePictureByIndex(SheetHandle handle, int index);
	{ "xlSheetRemovePictureByIndex", 2, c_xlSheetRemovePictureByIndex },
	// void xlSheetSetPicture(SheetHandle handle, int row, int col, int pictureId, double scale, int offset_x, int offset_y, int pos);
	{ "xlSheetSetPicture", 8, c_xlSheetSetPicture },
	// void xlSheetSetPicture2(SheetHandle handle, int row, int col, int pictureId, int width, int height, int offset_x, int offset_y, int pos);
	{ "xlSheetSetPicture2", 9, c_xlSheetSetPicture2 },
	// int xlSheetRemovePicture(SheetHandle handle, int row, int col);
	{ "xlSheetRemovePicture", 3, c_xlSheetRemovePicture },
	// int xlSheetGetHorPageBreak(SheetHandle handle, int index);
	{ "xlSheetGetHorPageBreak", 2, c_xlSheetGetHorPageBreak },
	// int xlSheetGetHorPageBreakSize(SheetHandle handle);
	{ "xlSheetGetHorPageBreakSize", 1, c_xlSheetGetHorPageBreakSize },
	// int xlSheetGetVerPageBreak(SheetHandle handle, int index);
	{ "xlSheetGetVerPageBreak", 2, c_xlSheetGetVerPageBreak },
	// int xlSheetGetVerPageBreakSize(SheetHandle handle);
	{ "xlSheetGetVerPageBreakSize", 1, c_xlSheetGetVerPageBreakSize },
	// int xlSheetSetHorPageBreak(SheetHandle handle, int row, int pageBreak);
	{ "xlSheetSetHorPageBreak", 3, c_xlSheetSetHorPageBreak },
	// int xlSheetSetVerPageBreak(SheetHandle handle, int col, int pageBreak);
	{ "xlSheetSetVerPageBreak", 3, c_xlSheetSetVerPageBreak },
	// void xlSheetSplit(SheetHandle handle, int row, int col);
	{ "xlSheetSplit", 3, c_xlSheetSplit },
	// int xlSheetSplitInfo(SheetHandle handle, int* row, int* col);
	{ "xlSheetSplitInfo", 1, c_xlSheetSplitInfo },
	// int xlSheetGroupRows(SheetHandle handle, int rowFirst, int rowLast, int collapsed);
	{ "xlSheetGroupRows", 4, c_xlSheetGroupRows },
	// int xlSheetGroupCols(SheetHandle handle, int colFirst, int colLast, int collapsed);
	{ "xlSheetGroupCols", 4, c_xlSheetGroupCols },
	// int xlSheetGroupSummaryBelow(SheetHandle handle);
	{ "xlSheetGroupSummaryBelow", 1, c_xlSheetGroupSummaryBelow },
	// void xlSheetSetGroupSummaryBelow(SheetHandle handle, int below);
	{ "xlSheetSetGroupSummaryBelow", 2, c_xlSheetSetGroupSummaryBelow },
	// int xlSheetGroupSummaryRight(SheetHandle handle);
	{ "xlSheetGroupSummaryRight", 1, c_xlSheetGroupSummaryRight },
	// void xlSheetSetGroupSummaryRight(SheetHandle handle, int right);
	{ "xlSheetSetGroupSummaryRight", 2, c_xlSheetSetGroupSummaryRight },
	// int xlSheetClear(SheetHandle handle, int rowFirst, int rowLast, int colFirst, int colLast);
	{ "xlSheetClear", 5, c_xlSheetClear },
	// int xlSheetInsertCol(SheetHandle handle, int colFirst, int colLast);
	{ "xlSheetInsertCol", 3, c_xlSheetInsertCol },
	// int xlSheetInsertRow(SheetHandle handle, int rowFirst, int rowLast);
	{ "xlSheetInsertRow", 3, c_xlSheetInsertRow },
	// int xlSheetRemoveCol(SheetHandle handle, int colFirst, int colLast);
	{ "xlSheetRemoveCol", 3, c_xlSheetRemoveCol },
	// int xlSheetRemoveRow(SheetHandle handle, int rowFirst, int rowLast);
	{ "xlSheetRemoveRow", 3, c_xlSheetRemoveRow },
	// int xlSheetInsertColAndKeepRanges(SheetHandle handle, int colFirst, int colLast);
	{ "xlSheetInsertColAndKeepRanges", 3, c_xlSheetInsertColAndKeepRanges },
	// int xlSheetInsertRowAndKeepRanges(SheetHandle handle, int rowFirst, int rowLast);
	{ "xlSheetInsertRowAndKeepRanges", 3, c_xlSheetInsertRowAndKeepRanges },
	// int xlSheetRemoveColAndKeepRanges(SheetHandle handle, int colFirst, int colLast);
	{ "xlSheetRemoveColAndKeepRanges", 3, c_xlSheetRemoveColAndKeepRanges },
	// int xlSheetRemoveRowAndKeepRanges(SheetHandle handle, int rowFirst, int rowLast);
	{ "xlSheetRemoveRowAndKeepRanges", 3, c_xlSheetRemoveRowAndKeepRanges },
	// int xlSheetCopyCell(SheetHandle handle, int rowSrc, int colSrc, int rowDst, int colDst);
	{ "xlSheetCopyCell", 5, c_xlSheetCopyCell },
	// int xlSheetFirstRow(SheetHandle handle);
	{ "xlSheetFirstRow", 1, c_xlSheetFirstRow },
	// int xlSheetLastRow(SheetHandle handle);
	{ "xlSheetLastRow", 1, c_xlSheetLastRow },
	// int xlSheetFirstCol(SheetHandle handle);
	{ "xlSheetFirstCol", 1, c_xlSheetFirstCol },
	// int xlSheetLastCol(SheetHandle handle);
	{ "xlSheetLastCol", 1, c_xlSheetLastCol },
	// int xlSheetFirstFilledRow(SheetHandle handle);
	{ "xlSheetFirstFilledRow", 1, c_xlSheetFirstFilledRow },
	// int xlSheetLastFilledRow(SheetHandle handle);
	{ "xlSheetLastFilledRow", 1, c_xlSheetLastFilledRow },
	// int xlSheetFirstFilledCol(SheetHandle handle);
	{ "xlSheetFirstFilledCol", 1, c_xlSheetFirstFilledCol },
	// int xlSheetLastFilledCol(SheetHandle handle);
	{ "xlSheetLastFilledCol", 1, c_xlSheetLastFilledCol },
	// int xlSheetDisplayGridlines(SheetHandle handle);
	{ "xlSheetDisplayGridlines", 1, c_xlSheetDisplayGridlines },
	// void xlSheetSetDisplayGridlines(SheetHandle handle, int show);
	{ "xlSheetSetDisplayGridlines", 2, c_xlSheetSetDisplayGridlines },
	// int xlSheetPrintGridlines(SheetHandle handle);
	{ "xlSheetPrintGridlines", 1, c_xlSheetPrintGridlines },
	// void xlSheetSetPrintGridlines(SheetHandle handle, int print);
	{ "xlSheetSetPrintGridlines", 2, c_xlSheetSetPrintGridlines },
	// int xlSheetZoom(SheetHandle handle);
	{ "xlSheetZoom", 1, c_xlSheetZoom },
	// void xlSheetSetZoom(SheetHandle handle, int zoom);
	{ "xlSheetSetZoom", 2, c_xlSheetSetZoom },
	// int xlSheetPrintZoom(SheetHandle handle);
	{ "xlSheetPrintZoom", 1, c_xlSheetPrintZoom },
	// void xlSheetSetPrintZoom(SheetHandle handle, int zoom);
	{ "xlSheetSetPrintZoom", 2, c_xlSheetSetPrintZoom },
	// int xlSheetGetPrintFit(SheetHandle handle, int* wPages, int* hPages);
	{ "xlSheetGetPrintFit", 1, c_xlSheetGetPrintFit },
	// void xlSheetSetPrintFit(SheetHandle handle, int wPages, int hPages);
	{ "xlSheetSetPrintFit", 3, c_xlSheetSetPrintFit },
	// int xlSheetLandscape(SheetHandle handle);
	{ "xlSheetLandscape", 1, c_xlSheetLandscape },
	// void xlSheetSetLandscape(SheetHandle handle, int landscape);
	{ "xlSheetSetLandscape", 2, c_xlSheetSetLandscape },
	// int xlSheetPaper(SheetHandle handle);
	{ "xlSheetPaper", 1, c_xlSheetPaper },
	// void xlSheetSetPaper(SheetHandle handle, int paper);
	{ "xlSheetSetPaper", 2, c_xlSheetSetPaper },
	// const wchar_t* xlSheetHeader(SheetHandle handle);
	{ "xlSheetHeader", 1, c_xlSheetHeader },
	// int xlSheetSetHeader(SheetHandle handle, const wchar_t* header, double margin);
	{ "xlSheetSetHeader", 3, c_xlSheetSetHeader },
	// double xlSheetHeaderMargin(SheetHandle handle);
	{ "xlSheetHeaderMargin", 1, c_xlSheetHeaderMargin },
	// const wchar_t* xlSheetFooter(SheetHandle handle);
	{ "xlSheetFooter", 1, c_xlSheetFooter },
	// int xlSheetSetFooter(SheetHandle handle, const wchar_t* footer, double margin);
	{ "xlSheetSetFooter", 3, c_xlSheetSetFooter },
	// double xlSheetFooterMargin(SheetHandle handle);
	{ "xlSheetFooterMargin", 1, c_xlSheetFooterMargin },
	// int xlSheetHCenter(SheetHandle handle);
	{ "xlSheetHCenter", 1, c_xlSheetHCenter },
	// void xlSheetSetHCenter(SheetHandle handle, int hCenter);
	{ "xlSheetSetHCenter", 2, c_xlSheetSetHCenter },
	// int xlSheetVCenter(SheetHandle handle);
	{ "xlSheetVCenter", 1, c_xlSheetVCenter },
	// void xlSheetSetVCenter(SheetHandle handle, int vCenter);
	{ "xlSheetSetVCenter", 2, c_xlSheetSetVCenter },
	// double xlSheetMarginLeft(SheetHandle handle);
	{ "xlSheetMarginLeft", 1, c_xlSheetMarginLeft },
	// void xlSheetSetMarginLeft(SheetHandle handle, double margin);
	{ "xlSheetSetMarginLeft", 2, c_xlSheetSetMarginLeft },
	// double xlSheetMarginRight(SheetHandle handle);
	{ "xlSheetMarginRight", 1, c_xlSheetMarginRight },
	// void xlSheetSetMarginRight(SheetHandle handle, double margin);
	{ "xlSheetSetMarginRight", 2, c_xlSheetSetMarginRight },
	// double xlSheetMarginTop(SheetHandle handle);
	{ "xlSheetMarginTop", 1, c_xlSheetMarginTop },
	// void xlSheetSetMarginTop(SheetHandle handle, double margin);
	{ "xlSheetSetMarginTop", 2, c_xlSheetSetMarginTop },
	// double xlSheetMarginBottom(SheetHandle handle);
	{ "xlSheetMarginBottom", 1, c_xlSheetMarginBottom },
	// void xlSheetSetMarginBottom(SheetHandle handle, double margin);
	{ "xlSheetSetMarginBottom", 2, c_xlSheetSetMarginBottom },
	// int xlSheetPrintRowCol(SheetHandle handle);
	{ "xlSheetPrintRowCol", 1, c_xlSheetPrintRowCol },
	// void xlSheetSetPrintRowCol(SheetHandle handle, int print);
	{ "xlSheetSetPrintRowCol", 2, c_xlSheetSetPrintRowCol },
	// int xlSheetPrintRepeatRows(SheetHandle handle, int* rowFirst, int* rowLast);
	{ "xlSheetPrintRepeatRows", 1, c_xlSheetPrintRepeatRows },
	// void xlSheetSetPrintRepeatRows(SheetHandle handle, int rowFirst, int rowLast);
	{ "xlSheetSetPrintRepeatRows", 3, c_xlSheetSetPrintRepeatRows },
	// int xlSheetPrintRepeatCols(SheetHandle handle, int* colFirst, int* colLast);
	{ "xlSheetPrintRepeatCols", 1, c_xlSheetPrintRepeatCols },
	// void xlSheetSetPrintRepeatCols(SheetHandle handle, int colFirst, int colLast);
	{ "xlSheetSetPrintRepeatCols", 3, c_xlSheetSetPrintRepeatCols },
	// int xlSheetPrintArea(SheetHandle handle, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlSheetPrintArea", 1, c_xlSheetPrintArea },
	// void xlSheetSetPrintArea(SheetHandle handle, int rowFirst, int rowLast, int colFirst, int colLast);
	{ "xlSheetSetPrintArea", 5, c_xlSheetSetPrintArea },
	// void xlSheetClearPrintRepeats(SheetHandle handle);
	{ "xlSheetClearPrintRepeats", 1, c_xlSheetClearPrintRepeats },
	// void xlSheetClearPrintArea(SheetHandle handle);
	{ "xlSheetClearPrintArea", 1, c_xlSheetClearPrintArea },
	// int xlSheetGetNamedRange(SheetHandle handle, const wchar_t* name, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int scopeId, int* hidden);
	{ "xlSheetGetNamedRange", 3, c_xlSheetGetNamedRange },
	// int xlSheetSetNamedRange(SheetHandle handle, const wchar_t* name, int rowFirst, int rowLast, int colFirst, int colLast, int scopeId);
	{ "xlSheetSetNamedRange", 7, c_xlSheetSetNamedRange },
	// int xlSheetDelNamedRange(SheetHandle handle, const wchar_t* name, int scopeId);
	{ "xlSheetDelNamedRange", 3, c_xlSheetDelNamedRange },
	// int xlSheetNamedRangeSize(SheetHandle handle);
	{ "xlSheetNamedRangeSize", 1, c_xlSheetNamedRangeSize },
	// const wchar_t* xlSheetNamedRange(SheetHandle handle, int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int* scopeId, int* hidden);
	{ "xlSheetNamedRange", 2, c_xlSheetNamedRange },
	// int xlSheetTableSize(SheetHandle handle);
	{ "xlSheetTableSize", 1, c_xlSheetTableSize },
	// const wchar_t* xlSheetTable(SheetHandle handle, int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int* headerRowCount, int* totalsRowCount);
	{ "xlSheetTable", 2, c_xlSheetTable },
	// int xlSheetHyperlinkSize(SheetHandle handle);
	{ "xlSheetHyperlinkSize", 1, c_xlSheetHyperlinkSize },
	// const wchar_t* xlSheetHyperlink(SheetHandle handle, int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast);
	{ "xlSheetHyperlink", 2, c_xlSheetHyperlink },
	// int xlSheetDelHyperlink(SheetHandle handle, int index);
	{ "xlSheetDelHyperlink", 2, c_xlSheetDelHyperlink },
	// void xlSheetAddHyperlink(SheetHandle handle, const wchar_t* hyperlink, int rowFirst, int rowLast, int colFirst, int colLast);
	{ "xlSheetAddHyperlink", 6, c_xlSheetAddHyperlink },
	// int xlSheetIsAutoFilter(SheetHandle handle);
	{ "xlSheetIsAutoFilter", 1, c_xlSheetIsAutoFilter },
	// AutoFilterHandle xlSheetAutoFilter(SheetHandle handle);
	{ "xlSheetAutoFilter", 1, c_xlSheetAutoFilter },
	// void xlSheetApplyFilter(SheetHandle handle);
	{ "xlSheetApplyFilter", 1, c_xlSheetApplyFilter },
	// void xlSheetRemoveFilter(SheetHandle handle);
	{ "xlSheetRemoveFilter", 1, c_xlSheetRemoveFilter },
	// const wchar_t* xlSheetName(SheetHandle handle);
	{ "xlSheetName", 1, c_xlSheetName },
	// void xlSheetSetName(SheetHandle handle, const wchar_t* name);
	{ "xlSheetSetName", 2, c_xlSheetSetName },
	// int xlSheetProtect(SheetHandle handle);
	{ "xlSheetProtect", 1, c_xlSheetProtect },
	// void xlSheetSetProtect(SheetHandle handle, int protect);
	{ "xlSheetSetProtect", 2, c_xlSheetSetProtect },
	// void xlSheetSetProtectEx(SheetHandle handle, int protect, const wchar_t* password, int enhancedProtection);
	{ "xlSheetSetProtectEx", 4, c_xlSheetSetProtectEx },
	// int xlSheetHidden(SheetHandle handle);
	{ "xlSheetHidden", 1, c_xlSheetHidden },
	// int xlSheetSetHidden(SheetHandle handle, int hidden);
	{ "xlSheetSetHidden", 2, c_xlSheetSetHidden },
	// void xlSheetGetTopLeftView(SheetHandle handle, int* row, int* col);
	{ "xlSheetGetTopLeftView", 1, c_xlSheetGetTopLeftView },
	// void xlSheetSetTopLeftView(SheetHandle handle, int row, int col);
	{ "xlSheetSetTopLeftView", 3, c_xlSheetSetTopLeftView },
	// int xlSheetRightToLeft(SheetHandle handle);
	{ "xlSheetRightToLeft", 1, c_xlSheetRightToLeft },
	// void xlSheetSetRightToLeft(SheetHandle handle, int rightToLeft);
	{ "xlSheetSetRightToLeft", 2, c_xlSheetSetRightToLeft },
	// void xlSheetSetAutoFitArea(SheetHandle handle, int rowFirst, int colFirst, int rowLast, int colLast);
	{ "xlSheetSetAutoFitArea", 5, c_xlSheetSetAutoFitArea },
	// void xlSheetAddrToRowCol(SheetHandle handle, const wchar_t* addr, int* row, int* col, int* rowRelative, int* colRelative);
	{ "xlSheetAddrToRowCol", 2, c_xlSheetAddrToRowCol },
	// const wchar_t* xlSheetRowColToAddr(SheetHandle handle, int row, int col, int rowRelative, int colRelative);
	{ "xlSheetRowColToAddr", 5, c_xlSheetRowColToAddr },
	// void xlSheetSetTabColor(SheetHandle handle, int color);
	{ "xlSheetSetTabColor", 2, c_xlSheetSetTabColor },
	// void xlSheetSetTabRgbColor(SheetHandle handle, int red, int green, int blue);
	{ "xlSheetSetTabRgbColor", 4, c_xlSheetSetTabRgbColor },
	// int xlSheetAddIgnoredError(SheetHandle handle, int rowFirst, int colFirst, int rowLast, int colLast, int iError);
	{ "xlSheetAddIgnoredError", 6, c_xlSheetAddIgnoredError },
	// void xlSheetAddDataValidation(SheetHandle handle, int type, int op, int rowFirst, int rowLast, int colFirst, int colLast, const wchar_t* value1, const wchar_t* value2);
	{ "xlSheetAddDataValidation", 9, c_xlSheetAddDataValidation },
	// void xlSheetAddDataValidationEx(SheetHandle handle, int type, int op, int rowFirst, int rowLast, int colFirst, int colLast, const wchar_t* value1, const wchar_t* value2, int allowBlank, int hideDropDown, int showInputMessage, int showErrorMessage, const wchar_t* promptTitle, const wchar_t* prompt, const wchar_t* errorTitle, const wchar_t* error, int errorStyle);
	{ "xlSheetAddDataValidationEx", 18, c_xlSheetAddDataValidationEx },
	// void xlSheetAddDataValidationDouble(SheetHandle handle, int type, int op, int rowFirst, int rowLast, int colFirst, int colLast, double value1, double value2);
	{ "xlSheetAddDataValidationDouble", 9, c_xlSheetAddDataValidationDouble },
	// void xlSheetAddDataValidationDoubleEx(SheetHandle handle, int type, int op, int rowFirst, int rowLast, int colFirst, int colLast, double value1, double value2, int allowBlank, int hideDropDown, int showInputMessage, int showErrorMessage, const wchar_t* promptTitle, const wchar_t* prompt, const wchar_t* errorTitle, const wchar_t* error, int errorStyle);
	{ "xlSheetAddDataValidationDoubleEx", 18, c_xlSheetAddDataValidationDoubleEx },
	// void xlSheetRemoveDataValidations(SheetHandle handle);
	{ "xlSheetRemoveDataValidations", 1, c_xlSheetRemoveDataValidations },
	// int xlSheetFormControlSize(SheetHandle handle);
	{ "xlSheetFormControlSize", 1, c_xlSheetFormControlSize },
	// FormControlHandle xlSheetFormControl(SheetHandle handle, int index);
	{ "xlSheetFormControl", 2, c_xlSheetFormControl },

	// ========================================================================================================================================================

	// FontHandle xlRichStringAddFont(RichStringHandle handle, FontHandle initFont);
	{ "xlRichStringAddFont", 2, c_xlRichStringAddFont },
	// void xlRichStringAddText(RichStringHandle handle, const wchar_t* text, FontHandle font);
	{ "xlRichStringAddText", 3, c_xlRichStringAddText },
	// const wchar_t* xlRichStringGetText(RichStringHandle handle, int index, FontHandle* font);
	{ "xlRichStringGetText", 3, c_xlRichStringGetText },
	// int xlRichStringTextSize(RichStringHandle handle);
	{ "xlRichStringTextSize", 1, c_xlRichStringTextSize },
};

ERL_NIF_INIT(Elixir.ElixirLibxl, nif_funcs, load, NULL, NULL, NULL)