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)
- 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* insertSheet(int index, const wchar_t* name, Sheet* initSheet = 0)
- Sheet* getSheet(int index) const
- SheetType sheetType(int index) const
- bool delSheet(int index)
- int sheetCount() const
- Format* addFormat(Format* initFormat = 0)
- Font* addFont(Font* initFont = 0)
- 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)
- const wchar_t* defaultFont(int* fontSize)
- void setDefaultFont(const wchar_t* fontName, int fontSize)
- bool rgbMode()
- void setRgbMode(bool rgbMode = true)
- 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)
- 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)
- 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)
- bool isDate(int row, int col) const
- ErrorType readError(int row, int col) const
- double colWidth(int col) const
- double rowHeight(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 pictureSize() const
- int getPicture(int index, int* rowTop, int* colLeft, int* rowBottom, int* colRight, int* width, int* height, int* offset_x, int* offset_y)
- void setPicture(int row, int col, int pictureId, double scale = 1.0, int offset_x = 0, int offset_y = 0)
- void setPicture2(int row, int col, int pictureId, int width = -1, int height = -1, int offset_x = 0, int offset_y = 0)
- 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 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)
- void clear(int rowFirst = 0, int rowLast = 65535, int colFirst = 0, int colLast = 255)
- bool insertRow(int rowFirst, int rowLast)
- bool insertCol(int colFirst, int colLast)
- bool removeRow(int rowFirst, int rowLast)
- bool removeCol(int colFirst, int colLast)
- bool copyCell(int rowSrc, int colSrc, int rowDst, int 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)
- 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)
- void setPrintRepeatRows(int rowFirst, int rowLast)
- void setPrintRepeatCols(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)
- const wchar_t* name() const
- void setName(const wchar_t* name)
- bool protect() const
- void setProtect(bool protect = true)
- 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 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)
|