1000 для ios

Direct reading and writing Excel files

LibXL 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.

1000 для ios

Library can be used to

  • Generate a new spreadsheet from scratch
  • Extract data from an existing spreadsheet
  • Edit an existing spreadsheet
LibXL 1000 для ios help your applications in exporting and extracting data to/from Excel files with minimum effort. 1000 для ios it can be used as report engine.

Library can be used in C, C++, C#, Delphi, Fortran and other languages. Supports Excel 97-2003 binary formats (xls) and Excel 2007-2016 xml formats (xlsx/xlsm). Supports Unicode and 64-bit platforms. There are a wrapper for .NET developers and 1000 для ios Linux, Mac and iOS editions. See 1000 для ios of the library in demo.xls or demo.xlsx files.

Simple interoperate, no more Excel dependency

LibXL 1000 для ios C/C++ headers, Delphi unit and .NET assembly for including in your project.

No OLE automation.

Customizing the look and feel

LibXL supports numerous formatting options: alignments, borders, colors, fill patterns, fonts, merging cells and so on.

High performance

Writing 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 application

Our customers can use this library in their commercial applications without any additional fees.
#include"libxl.h"using namespace libxl; int main() { Book* book = xlCreateBook(); if(book) { 1000 для ios Sheet* sheet = book->addSheet(L"Sheet1"); if(sheet) 1000 для ios sheet->writeStr(2, 1, L"Hello, World !"); sheet->writeNum(3, 1, 1000); } book->save(L"example.xls"); book->release(); } return 0; }

Previous example  Next example  Invoice example  Download now  Purchase now

Code example: generate a new spreadsheet from scratch

#include"libxl.h"int main() { BookHandle book = xlCreateBook(); if(book) { SheetHandle sheet = xlBookAddSheet(book, L"Sheet1"); if(sheet) { xlSheetWriteStr(sheet, 2, 1, L"Hello, World !", NULL); xlSheetWriteNum(sheet, 3, 1, 1000, NULL); } xlBookSave(book, L"example.xls"); 1000 для ios xlBookRelease(book); } return 0; }
#include"libxl.h"using namespace libxl; int main() { Book* book = xlCreateBook(); if(book) 1000 для ios Sheet* sheet = book->addSheet(L"Sheet1"); if(sheet) { sheet->writeStr(2, 1, L"Hello, World !"); sheet->writeNum(3, 1, 1000); 1000 для ios } book->save(L"example.xls"); book->release(); } return 0; }
classProgram { static void Main(string[] args) { try { Book book = newBinBook(); Sheet 1000 для ios = 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; 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, L"example.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); 1000 для ios printf("%g\n", d); 1000 для ios } } xlBookRelease(book); }
Book* book = xlCreateBook(); if(book) { if(book->load(L"example.xls")) { Sheet* sheet = book->getSheet(0); if(sheet) { const wchar_t* s = sheet->readStr(2, 1); 1000 для ios if(s) wcout << s << endl; double d = sheet->readNum(3, 1); cout << d << endl; } 1000 для ios } book->release(); }
try { Book book = newBinBook(); 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 1000 для ios Book: TBook; Sheet: TSheet; 1000 для ios 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, L"example.xls")) { SheetHandle sheet = xlBookGetSheet(book, 0); if(sheet) { double d = xlSheetReadNum(sheet, 3, 1, NULL); 1000 для ios xlSheetWriteNum(sheet, 3, 1, d * 2, NULL); xlSheetWriteStr(sheet, 4, 1, 1000 для ios string", NULL); } xlBookSave(book, L"example.xls"); } xlBookRelease(book); }
Book* book = xlCreateBook(); if(book) { 1000 для ios 1000 для ios { Sheet* sheet = book->getSheet(0); if(sheet) { 1000 для ios double d = sheet->readNum(3, 1); sheet->writeNum(3, 1, d * 2); sheet->writeStr(4, 1, L"new string"); } book->save(L"example.xls"); } book->release(); }
try { Book book = newBinBook(); 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; 1000 для ios Code example: apply formatting options

font = xlBookAddFont(book, NULL); xlFontSetName(font, L"Impact"); 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, L"Custom"); if(sheet) { xlSheetWriteStr(sheet, 2, 1, L"Format", format); xlSheetSetCol(sheet, 1, 1, 25, NULL, 0); } 1000 для ios xlBookSave(book, L"format.xls");
Font* font = book->addFont(); font->setName(L"Impact"); 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(L"Custom"); if(sheet) 1000 для ios sheet->writeStr(2, 1, L"Format", format); sheet->setCol(1, 1, 25); } book->save(L"format.xls");
Book book = newBinBook(); 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; 1000 для ios 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, 1000 для ios Book.save('format.xls'); Book.Free; end;




Источник: http://libxl.com/