Factory functions
-
Book* xlCreateBook()
Create a binary book instance for xls format. This function should be called first for receiving a book pointer.
This function and other classes are in libxl namespace.
-
Book* xlCreateXMLBook()
Create a xml book instance for xlsx format. This function should be called first for receiving a book pointer.
This function and other classes are in libxl namespace.
- bool load(const wchar_t* filename, const wchar_t* tempFile = 0)
- bool loadSheet(const wchar_t* filename, int sheetIndex, const wchar_t* tempFile = 0)
- bool loadPartially(const wchar_t* filename, int sheetIndex, int firstRow, int lastRow, const wchar_t* tempFile = 0)
- bool save(const wchar_t* filename, bool useTempFile = false)
- bool loadInfo(const wchar_t* filename)
- bool loadRaw(const char* data, unsigned size, int sheetIndex = -1, int firstRow = -1, int lastRow = -1)
- bool saveRaw(const char** data, unsigned* size)
- Sheet* addSheet(const wchar_t* name, Sheet* initSheet = 0)
- Sheet* insertSheet(int index, const wchar_t* name, Sheet* initSheet = 0)
- Sheet* getSheet(int index) const
- const wchar_t* getSheetName(int index) const
- SheetType sheetType(int index) const
- bool moveSheet(int srcIndex, int dstIndex)
- bool delSheet(int index)
- int sheetCount() const
- Format* addFormat(Format* initFormat = 0)
- Font* addFont(Font* initFont = 0)
- RichString* addRichString()
- int addCustomNumFormat(const wchar_t* customNumFormat)
- const wchar_t* customNumFormat(int fmt) const
- Format* format(int index)
- int formatSize()
- Font* font(int index)
- int fontSize()
- double datePack(int year, int month, int day,
int hour = 0, int min = 0, int sec = 0, int msec = 0)
- bool dateUnpack(double value,
int* year, int* month, int* day,
int* hour = 0, int* min = 0, int* sec = 0, int* msec = 0)
- Color colorPack(int red, int green, int blue)
- void colorUnpack(Color color, int* red, int* green, int* blue)
- int activeSheet() const
- void setActiveSheet(int index)
- int pictureSize() const
- PictureType getPicture(int index, const char** data, unsigned* size) const
- int addPicture(const wchar_t* filename)
- int addPicture2(const char* data, unsigned size)
- int addPictureAsLink(const wchar_t* filename, bool insert = false)
- const wchar_t* defaultFont(int* fontSize)
- void setDefaultFont(const wchar_t* fontName, int fontSize)
- bool rgbMode()
- void setRgbMode(bool rgbMode = true)
- CalcModeType calcMode() const
- void setCalcMode(CalcModeType calcMode)
- bool refR1C1() const
- void setRefR1C1(bool refR1C1 = true)
- int biffVersion() const
- bool isDate1904() const
- void setDate1904(bool date1904 = true)
- bool isTemplate() const
- void setTemplate(bool tmpl = true)
- void setKey(const wchar_t* name, const wchar_t* key)
- bool setLocale(const char* locale)
- const char* errorMessage() const
- void release()
- CellType cellType(int row, int col) const
- bool isFormula(int row, int col) const
- Format* cellFormat(int row, int col) const
- void setCellFormat(int row, int col, Format* format)
- const wchar_t* readStr(int row, int col, Format** format = 0)
- bool writeStr(int row, int col, const wchar_t* value, Format* format = 0, CellType type = CELLTYPE_STRING)
- RichString* readRichStr(int row, int col, Format** format = 0)
- bool writeRichStr(int row, int col, RichString* richString, Format* format = 0)
- double readNum(int row, int col, Format** format = 0) const
- bool writeNum(int row, int col, double value, Format* format = 0)
- bool readBool(int row, int col, Format** format = 0) const
- bool writeBool(int row, int col, bool value, Format* format = 0) const
- bool readBlank(int row, int col, Format** format = 0) const
- bool writeBlank(int row, int col, Format* format)
- const wchar_t* readFormula(int row, int col, Format** format = 0)
- bool writeFormula(int row, int col, const wchar_t* value, Format* format = 0)
- bool writeFormulaNum(int row, int col, const wchar_t* expr, double value, Format* format = 0)
- bool writeFormulaStr(int row, int col, const wchar_t* expr, const wchar_t* value, Format* format = 0)
- bool writeFormulaBool(int row, int col, const wchar_t* expr, bool value, Format* format = 0)
- const wchar_t* readComment(int row, int col) const
- void writeComment(int row, int col, const wchar_t* value, const wchar_t* author = 0, int width = 129, int height = 75)
- void removeComment(int row, int col)
- bool isDate(int row, int col) const
- bool isRichString(int row, int col) const
- ErrorType readError(int row, int col) const
- void writeError(int row, int col, ErrorType error, Format* format = 0)
- double colWidth(int col) const
- double rowHeight(int row) const
- int colWidthPx(int col) const
- int rowHeightPx(int row) const
- bool setCol(int colFirst, int colLast, double width, Format* format = 0, bool hidden = false)
- bool setRow(int row, double height, Format* format = 0, bool hidden = false)
- bool rowHidden(int row) const
- bool setRowHidden(int row, bool hidden)
- bool colHidden(int col) const
- bool setColHidden(int col, bool hidden)
- bool getMerge(int row, int col, int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- bool setMerge(int rowFirst, int rowLast, int colFirst, int colLast)
- bool delMerge(int row, int col)
- int mergeSize() const
- bool merge(int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- bool delMergeByIndex(int index)
- int pictureSize() const
- int getPicture(int index, int* rowTop, int* colLeft, int* rowBottom, int* colRight, int* width, int* height, int* offset_x, int* offset_y)
- bool removePictureByIndex(int index)
- void setPicture(int row, int col, int pictureId, double scale = 1.0, int offset_x = 0, int offset_y = 0, Position pos = POSITION_MOVE_AND_SIZE)
- void setPicture2(int row, int col, int pictureId, int width = -1, int height = -1, int offset_x = 0, int offset_y = 0, Position pos = POSITION_MOVE_AND_SIZE)
- bool removePicture(int row, int col)
- int getHorPageBreak(int index) const
- int getHorPageBreakSize() const
- int getVerPageBreak(int index) const
- int getVerPageBreakSize() const
- bool setHorPageBreak(int row, bool pageBreak = true)
- bool setVerPageBreak(int col, bool pageBreak = true)
- void split(int row, int col)
- bool splitInfo(int* row, int* col) const
- bool groupRows(int rowFirst, int rowLast, bool collapsed = true)
- bool groupCols(int colFirst, int colLast, bool collapsed = true)
- bool groupSummaryBelow() const
- void setGroupSummaryBelow(bool below)
- bool groupSummaryRight() const
- void setGroupSummaryRight(bool right)
- bool clear(int rowFirst = 0, int rowLast = 1048575, int colFirst = 0, int colLast = 16383)
- bool insertRow(int rowFirst, int rowLast, bool updateNamedRanges = true)
- bool insertCol(int colFirst, int colLast, bool updateNamedRanges = true)
- bool removeRow(int rowFirst, int rowLast, bool updateNamedRanges = true)
- bool removeCol(int colFirst, int colLast, bool updateNamedRanges = true)
- bool copyCell(int rowSrc, int colSrc, int rowDst, int colDst)
- int firstRow() const
- int lastRow() const
- int firstCol() const
- int lastCol() const
- int firstFilledRow() const
- int lastFilledRow() const
- int firstFilledCol() const
- int lastFilledCol() const
- bool displayGridlines() const
- void setDisplayGridlines(bool show = true)
- bool printGridlines() const
- void setPrintGridlines(bool print = true)
- int zoom() const
- void setZoom(int zoom)
- int printZoom() const
- void setPrintZoom(int zoom)
- bool landscape() const
- void setLandscape(bool landscape = true)
- bool getPrintFit(int* wPages, int* hPages) const
- void setPrintFit(int wPages = 1, int hPages = 1)
- Paper paper() const
- void setPaper(Paper paper = PAPER_DEFAULT)
- const wchar_t* header() const
- bool setHeader(const wchar_t* header, double margin = 0.5)
- double headerMargin() const
- const wchar_t* footer() const
- bool setFooter(const wchar_t* footer, double margin = 0.5)
- double footerMargin() const
- bool hCenter() const
- void setHCenter(bool hCenter = true)
- bool vCenter() const
- void setVCenter(bool vCenter = true)
- double marginLeft() const
- void setMarginLeft(double margin)
- double marginRight() const
- void setMarginRight(double margin)
- double marginTop() const
- void setMarginTop(double margin)
- double marginBottom() const
- void setMarginBottom(double margin)
- bool printRowCol() const
- void setPrintRowCol(bool print = true)
- bool printRepeatRows(int* rowFirst, int* rowLast)
- void setPrintRepeatRows(int rowFirst, int rowLast)
- bool printRepeatCols(int* colFirst, int* colLast)
- void setPrintRepeatCols(int colFirst, int colLast)
- bool printArea(int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- void setPrintArea(int rowFirst, int rowLast, int colFirst, int colLast)
- void clearPrintRepeats()
- void clearPrintArea()
- bool getNamedRange(const wchar_t* name, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int scopeId = SCOPE_UNDEFINED, bool* hidden = 0)
- bool setNamedRange(const wchar_t* name, int rowFirst, int rowLast, int colFirst, int colLast, int scopeId = SCOPE_UNDEFINED)
- bool delNamedRange(const wchar_t* name, int scopeId = SCOPE_UNDEFINED)
- int namedRangeSize() const
- const wchar_t* namedRange(int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int* scopeId = 0, bool* hidden = 0)
- int tableSize() const
- const wchar_t* table(int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast, int* headerRowCount, int* totalsRowCount)
- int hyperlinkSize() const
- const wchar_t* hyperlink(int index, int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- bool delHyperlink(int index)
- void addHyperlink(const wchar_t* hyperlink, int rowFirst, int rowLast, int colFirst, int colLast)
- AutoFilter autoFilter()
- void applyFilter()
- void removeFilter()
- const wchar_t* name() const
- void setName(const wchar_t* name)
- bool protect() const
- void setProtect(bool protect = true, const wchar_t* password = 0, EnhancedProtection prot = PROT_DEFAULT)
- bool rightToLeft() const
- void setRightToLeft(bool rightToLeft = true)
- SheetState hidden() const
- bool setHidden(SheetState state = SHEETSTATE_HIDDEN)
- void getTopLeftView(int* row, int* col) const
- void setTopLeftView(int row, int col)
- void setAutoFitArea(int rowFirst = 0, int colFirst = 0, int rowLast = -1, int colLast = -1)
- void addrToRowCol(const wchar_t* addr, int* row, int* col, bool* rowRelative = 0, bool* colRelative = 0)
- const wchar_t* rowColToAddr(int row, int col, bool rowRelative = true, bool colRelative = true)
- void setTabColor(Color color)
- void setTabColor(int red, int green, int blue)
- bool addIgnoredError(int rowFirst, int colFirst, int rowLast, int colLast, IgnoredError iError)
- void addDataValidation(DataValidationType type, DataValidationOperator op, int rowFirst, int rowLast, int colFirst, int colLast, const wchar_t* value1, const wchar_t* value2, bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = true, bool showErrorMessage = true, const wchar_t* promptTitle, const wchar_t* prompt = 0, const wchar_t* errorTitle = 0, const wchar_t* error = 0, DataValidationErrorStyle errorStyle = VALIDATION_ERRSTYLE_STOP)
- void addDataValidationDouble(DataValidationType type, DataValidationOperator op, int rowFirst, int rowLast, int colFirst, int colLast, double value1, double value2, bool allowBlank = true, bool hideDropDown = false, bool showInputMessage = true, bool showErrorMessage = true, const wchar_t* promptTitle, const wchar_t* prompt = 0, const wchar_t* errorTitle = 0, const wchar_t* error = 0, DataValidationErrorStyle errorStyle = VALIDATION_ERRSTYLE_STOP)
- void removeDataValidations()
- bool getRef(int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- void setRef(int rowFirst, int rowLast, int colFirst, int colLast)
- FilterColumn column(int colId)
- int columnSize() const
- FilterColumn columnByIndex(int index)
- bool getSortRange(int* rowFirst, int* rowLast, int* colFirst, int* colLast)
- bool getSort(int* columnIndex, bool* descending)
- bool setSort(int columnIndex, bool descending = false)
- bool addSort(int columnIndex, bool descending = false)
- int index() const
- Filter filterType() const
- int filterSize() const
- const wchar_t* filter(int index) const
- void addFilter(const wchar_t* value)
- bool getTop10(double* value, bool* top, bool* percent)
- void setTop10(double value, bool top = true, bool percent = false)
- bool getCustomFilter(Operator* op1, const wchar_t** v1, Operator* op2, const wchar_t** v2, bool* andOp)
- void setCustomFilter(Operator op1, const wchar_t* v1, Operator op2 = OPERATOR_EQUAL, const wchar_t* v2 = 0, bool andOp = false)
- void clear()
|