試します:linuxの下でexcelデータを解析します.
【はじめに】まず一つ褒めてください.このような変態のニーズ.
【原文】http://www.libxl.com/
Direct reading and writing Excel files
LibXL is a library that can read and write Excel files.It doesn't require Microsoft Excel and cobines and powerful feature s.Librarycan be used to Generate a new spreadsheet from scratch Extract data from an existing spreadsheet Edit an existing spreadsheet LibXL can help your aplications in exporting data to/from Excel files with minimum effort.Also it can be used report engine.Library can be used in C+,C+,Exorts Exorts Extrats.Supports Unicode and 64-bit plotforms.The re are a wrapper for.NET developers and separate Mac and Linux edition.
Simple interoperate、no more Excel dependency
LibXL has C/C++headers,Delphi unit and.NET assim bly for including in your project.No One atomation.
Customizing the look and feel
LibXL supports numerus formating options:alignmenments、borders、colors、fill patterns、fonts、mergcels and son.
High performance
Writing speed is about 2 100,000エクセルls per second for numbers and 240 000エクセルls per second for 8-character rand dom stings in binary format(CPU 3.2 GHz)
Royalty-free distribution with your aplication
Our customers can use this library in theirs commerications without any fees.
Code example:generate a new spreadsheet from scratch
Code example:extract data from an existing spreadsheet
Code example:edit an existing spreadsheet
Code example:appy formating options
【原文】http://www.libxl.com/
Direct reading and writing Excel files
LibXL is a library that can read and write Excel files.It doesn't require Microsoft Excel and cobines and powerful feature s.Librarycan be used to
Simple interoperate、no more Excel dependency
LibXL has C/C++headers,Delphi unit and.NET assim bly for including in your project.No One atomation.
Customizing the look and feel
LibXL supports numerus formating options:alignmenments、borders、colors、fill patterns、fonts、mergcels and son.
High performance
Writing speed is about 2 100,000エクセルls per second for numbers and 240 000エクセルls per second for 8-character rand dom stings in binary format(CPU 3.2 GHz)
Royalty-free distribution with your aplication
Our customers can use this library in theirs commerications without any fees.
Code example:generate a new spreadsheet from scratch
#include "libxl.h"
using namespace libxl;
int main()
{
Book* book = xlCreateBook();
if(book)
{
Sheet* sheet = book->addSheet(L"Sheet1");
if(sheet)
{
sheet->writeStr(2, 1, L"Hello, World !");
sheet->writeNum(3, 1, 1000);
}
book->save(L"example.xls");
book->release();
}
return 0;
}
Code example:extract data from an existing spreadsheet
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);
if(s) wcout << s << endl;
double d = sheet->readNum(3, 1);
cout << d << endl;
}
}
book->release();
}
Code example:edit an existing spreadsheet
Book* book = xlCreateBook();
if(book)
{
if(book->load(L"example.xls"))
{
Sheet* sheet = book->getSheet(0);
if(sheet)
{
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();
}
Code example:appy formating options
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)
{
sheet->writeStr(2, 1, L"Format", format);
sheet->setCol(1, 1, 25);
}
book->save(L"format.xls");