github地址:https://github.com/tfussell/xlnt
编译步骤:
mkdir build
cd build
cmake ..
make
souce目录下有动态库
代码栗子
#include <xlnt/xlnt.hpp>
#include <iostream>
#include <string.h>
int main()
{
xlnt::workbook wb;
xlnt::worksheet ws = wb.active_sheet();
ws.cell("A1").value(5);
ws.cell("B2").value("string data");
xlnt::font font;
xlnt::font run_font;
run_font.color(xlnt::color::blue());
run_font.name("SimSun");
// run_font.scheme("ascheme");
run_font.size(13)