Add a description to examples

This commit is contained in:
tfussell 2014-05-19 17:35:24 -04:00
parent e9355262ab
commit 7cd752613a

View File

@ -7,6 +7,7 @@ xlnt is a c++ library that reads and write XLSX files. The API is roughly based
Usage Usage
---- ----
Create a new spreadsheet
```c++ ```c++
xlnt::workbook wb; xlnt::workbook wb;
xlnt::worksheet ws = wb.get_active_sheet(); xlnt::worksheet ws = wb.get_active_sheet();
@ -16,7 +17,10 @@ ws.cell("C3") = "=RAND()";
ws.merge_cells("C3:C4"); ws.merge_cells("C3:C4");
ws.freeze_panes("B2"); ws.freeze_panes("B2");
wb.save("book1.xlsx"); wb.save("book1.xlsx");
```
Open an existing spreadsheet
```c++
xlnt::workbook wb2; xlnt::workbook wb2;
wb2.load("book2.xlsx"); wb2.load("book2.xlsx");
wb2["sheet1"].get_dimensions(); wb2["sheet1"].get_dimensions();