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.
Book class
- bool load(const wchar_t* filename)
- bool save(const wchar_t* filename)
- bool loadRaw(const char* data, unsigned size)
- bool saveRaw(const char** data, unsigned* size)
- Sheet* addSheet(const wchar_t* name, Sheet* initSheet = 0)
- Sheet* getSheet(unsigned short index) const
- bool delSheet(unsigned short index)
- unsigned short sheetCount() const
- Format* addFormat(Format* initFormat = 0)
- Font* addFont(Font* initFont = 0)
- unsigned addCustomNumFormat(const wchar_t* customNumFormat)
- const wchar_t* customNumFormat(unsigned fmt) const
- Format* format(unsigned short index)
- unsigned short formatSize()
- Font* font(unsigned short index)
- unsigned short fontSize()
- double datePack(unsigned short year, unsigned short month, unsigned short day,
unsigned short hour = 0, unsigned short min = 0, unsigned short sec = 0, unsigned short msec = 0) - bool dateUnpack(double value,
unsigned short* year, unsigned short* month, unsigned short* day,
unsigned short* hour = 0, unsigned short* min = 0, unsigned short* sec = 0, unsigned short* msec = 0) - Color colorPack(unsigned short red, unsigned short green, unsigned short blue)
- void colorUnpack(Color color, unsigned short* red, unsigned short* green, unsigned short* blue)
- unsigned short activeSheet() const
- void setActiveSheet(unsigned short index)
- int addPicture(const wchar_t* filename)
- int addPicture2(const char* data, unsigned size)
- const wchar_t* defaultFont(unsigned short* fontSize)
- void setDefaultFont(const wchar_t* fontName, unsigned short fontSize)
- bool rgbMode()
- void setRgbMode(bool rgbMode = true)
- void setKey(const wchar_t* name, const wchar_t* key)
- void setLocale(const char* locale)
- const char* errorMessage() const
- void release()
Sheet class
- CellType cellType(unsigned short row, unsigned short col) const
- bool isFormula(unsigned short row, unsigned short col) const
- Format* cellFormat(unsigned short row, unsigned short col) const
- void setCellFormat(unsigned short row, unsigned short col, Format* format)
- const wchar_t* readStr(unsigned short row, unsigned short col, Format** format = 0)
- bool writeStr(unsigned short row, unsigned short col, const wchar_t* value, Format* format = 0)
- double readNum(unsigned short row, unsigned short col, Format** format = 0) const
- bool writeNum(unsigned short row, unsigned short col, double value, Format* format = 0)
- bool readBool(unsigned short row, unsigned short col, Format** format = 0) const
- bool writeBool(unsigned short row, unsigned short col, bool value, Format* format = 0) const
- bool readBlank(unsigned short row, unsigned short col, Format** format = 0) const
- bool writeBlank(unsigned short row, unsigned short col, Format* format)
- const wchar_t* readFormula(unsigned short row, unsigned short col, Format** format = 0)
- bool writeFormula(unsigned short row, unsigned short col, const wchar_t* value, Format* format = 0)
- const wchar_t* readComment(unsigned short row, unsigned short col) const
- void writeComment(unsigned short row, unsigned short col, const wchar_t* value, const wchar_t* author = 0, int width = 129, int height = 75)
- bool isDate(unsigned short row, unsigned short col) const
- ErrorType readError(unsigned short row, unsigned short col) const
- double colWidth(unsigned short col) const
- double rowHeight(unsigned short row) const
- bool setCol(unsigned short colFirst, unsigned short colLast, double width, Format* format = 0, bool hidden = false)
- bool setRow(unsigned short row, double height, Format* format = 0, bool hidden = false)
- bool getMerge(unsigned short row, unsigned short col, unsigned short* rowFirst, unsigned short* rowLast, unsigned short* colFirst, unsigned short* colLast)
- bool setMerge(unsigned short rowFirst, unsigned short rowLast, unsigned short colFirst, unsigned short colLast)
- bool delMerge(unsigned short row, unsigned short col)
- void setPicture(unsigned short row, unsigned short col, int pictureId, double scale = 1.0)
- void setPicture2(unsigned short row, unsigned short col, int pictureId, int width, int height)
- bool setHorPageBreak(unsigned short row, bool pageBreak = true)
- bool setVerPageBreak(unsigned short col, bool pageBreak = true)
- void split(unsigned short row, unsigned short col)
- bool groupRows(unsigned short rowFirst, unsigned short rowLast, bool collapsed = true)
- bool groupCols(unsigned short colFirst, unsigned short colLast, bool collapsed = true)
- void clear(unsigned short rowFirst = 0, unsigned short rowLast = 65535, unsigned short colFirst = 0, unsigned short colLast = 255)
- bool insertRow(unsigned short rowFirst, unsigned short rowLast)
- bool insertCol(unsigned short colFirst, unsigned short colLast)
- bool removeRow(unsigned short rowFirst, unsigned short rowLast)
- bool removeCol(unsigned short colFirst, unsigned short colLast)
- bool copyCell(unsigned short rowSrc, unsigned short colSrc, unsigned short rowDst, unsigned short colDst)
- int firstRow() const
- int lastRow() const
- int firstCol() const
- int lastCol() const
- bool displayGridlines() const
- void setDisplayGridlines(bool show = true)
- bool printGridlines() const
- void setPrintGridlines(bool print = true)
- unsigned zoom() const
- void setZoom(unsigned zoom)
- unsigned printZoom() const
- void setPrintZoom(unsigned zoom)
- bool landscape() const
- void setLandscape(bool landscape = true)
- 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)
- const wchar_t* name() const
- void setName(const wchar_t* name)
- bool protect() const
- void setProtect(bool protect = true)
Format class
- Font* font() const
- bool setFont(Font* font)
- unsigned numFormat() const
- void setNumFormat(unsigned numFormat)
- AlignH alignH() const
- void setAlignH(AlignH align)
- AlignV alignV() const
- void setAlignV(AlignV align)
- bool wrap() const
- void setWrap(bool wrap = true)
- unsigned rotation() const
- bool setRotation(unsigned rotation)
- unsigned indent() const
- void setIndent(unsigned indent)
- bool shrinkToFit() const
- void setShrinkToFit(bool shrinkToFit = true)
- void setBorder(BorderStyle style = BORDERSTYLE_THIN)
- void setBorderColor(Color color)
- BorderStyle borderLeft() const
- void setBorderLeft(BorderStyle style = BORDERSTYLE_THIN)
- BorderStyle borderRight() const
- void setBorderRight(BorderStyle style = BORDERSTYLE_THIN)
- BorderStyle borderTop() const
- void setBorderTop(BorderStyle style = BORDERSTYLE_THIN)
- BorderStyle borderBottom() const
- void setBorderBottom(BorderStyle style = BORDERSTYLE_THIN)
- Color borderLeftColor() const
- void setBorderLeftColor(Color color)
- Color borderRightColor() const
- void setBorderRightColor(Color color)
- Color borderTopColor() const
- void setBorderTopColor(Color color)
- Color borderBottomColor() const
- void setBorderBottomColor(Color color)
- BorderDiagonal borderDiagonal() const
- void setBorderDiagonal(BorderDiagonal border)
- Color borderDiagonalColor() const
- void setBorderDiagonalColor(Color color)
- FillPattern fillPattern() const
- void setFillPattern(FillPattern pattern)
- Color patternForegroundColor() const
- void setPatternForegroundColor(Color color)
- Color patternBackgroundColor() const
- void setPatternBackgroundColor(Color color)
- bool locked() const
- void setLocked(bool locked = true)
- bool hidden() const
- void setHidden(bool hidden = true)
Font class
- unsigned size() const
- void setSize(unsigned size)
- bool italic() const
- void setItalic(bool italic = true)
- bool strikeOut() const
- void setStrikeOut(bool strikeOut = true)
- Color color() const
- void setColor(Color color)
- bool bold() const
- void setBold(bool bold = true)
- Script script() const
- void setScript(Script script)
- Underline underline() const
- void setUnderline(Underline underline)
- const wchar_t* name() const
- bool setName(const wchar_t* name)