C++ Excel Library to read/write xls/xlsx files - LibXL

Web Name: C++ Excel Library to read/write xls/xlsx files - LibXL

WebSite: http://www.libxl.com

ID:234055

Keywords:

to,read,Excel,Library,write,files,LibXL,xls,

Description:

keywords:
description:LibXL is a library for direct reading and writing of Excel files (xls/xlsx) without OLE automation and Microsoft Excel. Supports C, C++, C#.NET, Delphi, PHP, PowerBASIC and other languages.
LibXL
excel library for developers Direct reading and writing Excel filesLibXL is a library that can read and write Excel files. It doesn't require Microsoft Excel and .NET framework, combines an easy to use and powerful features. Library can be used to Generate a new spreadsheet from scratch Extract data from an existing spreadsheet Edit an existing spreadsheetLibXL can help your applications in exporting and extracting data to/from Excel files with minimum effort.Also it can be used as report engine. Library can be used in C, C++, C#, Delphi, PHP, Python, PowerBASIC, Xojo, Fortran and other languages. Supports Excel 97-2003 binary formats (xls), Excel 2007-2019 and Office 365 xml formats (xlsx/xlsm). Supports Unicode and 64-bit platforms. There are a wrapper for .NET developers and separate Linux, Mac and iOS editions. See features of the library in demo.xls or demo.xlsx files.Simple interoperate, no more Excel dependencyLibXL has C/C++ headers, Delphi unit and .NET assembly for including in your project. No OLE automation.Customizing the look and feelLibXL supports numerous formatting options: alignments, borders, colors, fill patterns, fonts, merging cells and so on.
High performanceWriting speed is about 2 100 000 cells per second for numbers and 240 000 cells per second for 8-character random strings in binary xls format (CPU 3.2 GHz).Royalty-free distribution with your applicationOur customers can use this library in their commercial applications without any additional fees.Code example: generate a new spreadsheet from scratch
#include libxl.husing namespace libxl;int main() {    Book* book = xlCreateBook(); // xlCreateXMLBook() for xlsx    if(book)    {        Sheet* sheet = book-addSheet(LSheet1);        if(sheet)        {            sheet-writeStr(2, 1, LHello, World !);            sheet-writeNum(3, 1, 1000);        }        book-save(Lexample.xls);        book-release();    }     return 0;}

Previous exampleNext exampleInvoice exampleDownload nowPurchase nowCode example: generate a new spreadsheet from scratch
#include libxl.hint main(){    BookHandle book = xlCreateBook(); // xlCreateXMLBook()    if(book)     {        SheetHandle sheet = xlBookAddSheet(book, LSheet1);        if(sheet)         {            xlSheetWriteStr(sheet, 2, 1, LHello, World !, NULL);            xlSheetWriteNum(sheet, 3, 1, 1000, NULL);        }        xlBookSave(book, Lexample.xls);        xlBookRelease(book);    }    return 0;}
#include libxl.husing namespace libxl;int main() {    Book* book = xlCreateBook(); // xlCreateXMLBook() for xlsx    if(book)    {        Sheet* sheet = book-addSheet(LSheet1);        if(sheet)        {            sheet-writeStr(2, 1, LHello, World !);            sheet-writeNum(3, 1, 1000);        }        book-save(Lexample.xls);        book-release();    }     return 0;}
class Program{     static void Main(string[] args)    {        try         {            Book book = new BinBook(); // use XmlBook() for xlsx            Sheet sheet = book.addSheet(Sheet1);            sheet.writeStr(2, 1, Hello, World !);            sheet.writeNum(3, 1, 1000);            book.save(example.xls);            }        catch (System.Exception e)        {            Console.WriteLine(e.Message);        }    }}
var  Book: TBook;  Sheet: TSheet;begin  Book := TBinBook.Create; // use TXmlBook() for xlsx  Sheet := Book.addSheet('Sheet1');  Sheet.writeStr(2, 1, 'Hello, World !');  Sheet.writeNum(3, 1, 1000);  Book.save('example.xls');  Book.Free;end;
Code example: extract data from an existing spreadsheet
BookHandle book = xlCreateBook();if(book) {    if(xlBookLoad(book, Lexample.xls))     {        SheetHandle sheet = xlBookGetSheet(book, 0);        if(sheet)        {            double d;            const wchar_t* s = xlSheetReadStr(sheet, 2, 1, NULL);            if(s) wprintf(L%s\n, s);            d = xlSheetReadNum(sheet, 3, 1, NULL);            printf(%g\n, d);        }    }            xlBookRelease(book);}
Book* book = xlCreateBook();if(book){    if(book-load(Lexample.xls))    {        Sheet* sheet = book-getSheet(0);        if(sheet)        {            const wchar_t* s = sheet-readStr(2, 1);            if(s) wcout  s  endl;            double d = sheet-readNum(3, 1);            cout  d  endl;        }    }    book-release();}
try {    Book book = new BinBook();    book.load(example.xls);    Sheet sheet = book.getSheet(0);    string s = sheet.readStr(2, 1);    Console.WriteLine(s);    double d = sheet.readNum(3, 1);    Console.WriteLine(d);}catch (System.Exception e){    Console.WriteLine(e.Message);}
var  Book: TBook;  Sheet: TSheet;  d: double;  s: string;begin  Book := TBinBook.Create;  Book.load('example.xls');  Sheet := Book.getSheet(0);  s := Sheet.readStr(2, 1);  d := Sheet.readNum(3, 1);  Book.Free;end;
Code example: edit an existing spreadsheet
BookHandle book = xlCreateBook();if(book) {            if(xlBookLoad(book, Lexample.xls))     {        SheetHandle sheet = xlBookGetSheet(book, 0);        if(sheet)        {                            double d = xlSheetReadNum(sheet, 3, 1, NULL);            xlSheetWriteNum(sheet, 3, 1, d * 2, NULL);            xlSheetWriteStr(sheet, 4, 1, Lnew string, NULL);        }        xlBookSave(book, Lexample.xls);                }            xlBookRelease(book);}
Book* book = xlCreateBook();if(book) {                    if(book-load(Lexample.xls))    {        Sheet* sheet = book-getSheet(0);        if(sheet)         {               double d = sheet-readNum(3, 1);            sheet-writeNum(3, 1, d * 2);            sheet-writeStr(4, 1, Lnew string);        }        book-save(Lexample.xls);    }    book-release();   }
try {    Book book = new BinBook();    book.load(example.xls);    Sheet sheet = book.getSheet(0);    double d = sheet.readNum(3, 1);    sheet.writeNum(3, 1, d * 2);    sheet.writeStr(4, 1, new string);    book.save(example.xls);}catch (System.Exception e){    Console.WriteLine(e.Message);}
var  Book: TBook;  Sheet: TSheet;  d: double;begin  Book := TBinBook.Create;  Book.load('example.xls');  Sheet := Book.getSheet(0);  d := Sheet.readNum(3, 1);  Sheet.writeNum(3, 1, d * 2);  Book.save('example.xls');  Book.Free;end;
Code example: apply formatting options
font = xlBookAddFont(book, NULL);xlFontSetName(font, LImpact);xlFontSetSize(font, 36);format = xlBookAddFormat(book, NULL);xlFormatSetAlignH(format, ALIGNH_CENTER);xlFormatSetBorder(format, BORDERSTYLE_MEDIUMDASHDOTDOT);xlFormatSetBorderColor(format, COLOR_RED);xlFormatSetFont(format, font);sheet = xlBookAddSheet(book, LCustom);if(sheet) {    xlSheetWriteStr(sheet, 2, 1, LFormat, format);    xlSheetSetCol(sheet, 1, 1, 25, NULL, 0);}xlBookSave(book, Lformat.xls);
Font* font = book-addFont();font-setName(LImpact);font-setSize(36);        Format* format = book-addFormat();format-setAlignH(ALIGNH_CENTER);format-setBorder(BORDERSTYLE_MEDIUMDASHDOTDOT);format-setBorderColor(COLOR_RED);format-setFont(font);           Sheet* sheet = book-addSheet(LCustom);if(sheet){    sheet-writeStr(2, 1, LFormat, format);    sheet-setCol(1, 1, 25);}book->save(Lformat.xls);
Book book = new BinBook();Font font = book.addFont();font.size = 36;Format format = book.addFormat();format.alignH = AlignH.ALIGNH_CENTER;format.setBorder(BorderStyle.BORDERSTYLE_MEDIUMDASHDOTDOT);format.setBorderColor(Color.COLOR_RED);format.font = font;Sheet sheet = book.addSheet(Sheet1);sheet.writeStr(2, 1, Format, format);sheet.setCol(1, 1, 25);book.save(format.xls);
var  Book: TBook;  Sheet: TSheet;  Font: TFont;  Format: TFormat;begin  Book := TBinBook.Create;  Font := Book.addFont();  Font.setSize(36);  Format := Book.addFormat();  Format.alignH := ALIGNH_CENTER;  Format.setBorder(BORDERSTYLE_MEDIUMDASHDOTDOT);  Format.Font := Font;  Sheet := Book.addSheet('Custom');  Sheet.writeStr(2, 1, 'Format', Format);  Sheet.setCol(1, 1, 25);  Book.save('format.xls');  Book.Free;end;




Home Download Documentation Examples Setup FAQ Purchase Contact 2008 - 2021 XLware. All rights reserved.

TAGS:to read Excel Library write files LibXL xls 

<<< Thank you for your visit >>>

LibXL is a library for direct reading and writing of Excel files (xls/xlsx) without OLE automation and Microsoft Excel. Supports C, C++, C#.NET, Delphi, PHP, PowerBASIC and other languages.

Websites to related :
gaijin-life.info Coming Soon

  keywords:
description:This is a default index page for a new domain.
gaijin-life.info Powered by VESTA

▷ RealtyTrac.com : Foreclosure

  keywords:
description:ℹ️ Foreclosure listings from RealtyTrac, including pre-foreclosures, house auctions and bank owned homes. Search over 1 million

Honors College | | Oregon State

  keywords:
description:
Skip to main content OREGON STATE UNIVERSITY Open search box Honors College Toggle menu

Pitch and Match | PitchandMatch

  keywords:
description:
PITCH and

Solecollector.com : Sole Collect

  keywords:
description:The largest sneaker magazine and sneaker forum in the world.Sole Collector is the leading authority on sneaker news, release dat

PortAudio - an Open-Source Cross

  keywords:audio, library, portable, open-source, DirectSound, sound, music, WMME, synthesis, ASIO, OSS
description:PortAudio is a cross platform, open-

Institute for Water and Watershe

  keywords:
description:
Skip to main content OREGON STATE UNIVERSITY Open search box Institute for Water and Watersheds

Fat Pitch Financials - Special s

  keywords:
description:An individual investor's discoveries in special situation stocks and value investing.
Skip to content

Home | O.H. Hinsdale Wave Resear

  keywords:
description:
Skip to main content OREGON STATE UNIVERSITY Open search box College of Engineering O.H. Hinsdal

Free Educational Software And Ga

  keywords:
description:
Looking for College Scholarship Money? Try These Five Sites According to the National Cente

ads

Hot Websites