mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
16 lines
318 B
C++
16 lines
318 B
C++
#include <xlnt/xlnt.hpp>
|
|
|
|
int main()
|
|
{
|
|
xlnt::workbook wb;
|
|
xlnt::worksheet ws = wb.active_sheet();
|
|
ws.cell("A1").value(5);
|
|
ws.cell("B2").value("string data");
|
|
ws.cell("C3").formula("=RAND()");
|
|
ws.merge_cells("C3:C4");
|
|
ws.freeze_panes("B2");
|
|
wb.save("data/sample.xlsx");
|
|
|
|
return 0;
|
|
}
|