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); } } }