From be412599ba54b111d55d9f81cff00615c9ec0e9d Mon Sep 17 00:00:00 2001 From: Adam Nielsen Date: Mon, 28 Sep 2015 18:09:19 +1000 Subject: [PATCH] Update sample1.cpp so it will compile --- docs/samples/sample1.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/samples/sample1.cpp b/docs/samples/sample1.cpp index fb8541db..5ca2d83e 100644 --- a/docs/samples/sample1.cpp +++ b/docs/samples/sample1.cpp @@ -1,15 +1,17 @@ +#include +#include int main() { - for(auto sheet : xlnt::load_workbook("book.xlsx")) + for(auto sheet : xlnt::reader::load_workbook("book.xlsx")) { std::cout << sheet.get_title() << ": " << std::endl; - for(auto row : sheet) + for(auto row : sheet.rows()) { for(auto cell : row) { - std::cout << cell << ", "; + std::cout << cell.get_value().as() << ", "; } std::cout << std::endl; @@ -26,7 +28,7 @@ int main() { for(int column = 0; column < 1000; column++) { - sheet[xlnt::cell_reference(column, row)] = row * 1000 + column; + sheet[xlnt::cell_reference(column, row)].set_value(row * 1000 + column); } } }