Closed sukoi26 closed 8 years ago
I tried it without success
xlnt::row_t row = 1;
for(xlnt::cell_reference(1, row); row < 40; row++)
{
// 10 c by 40 l
std::vector<int> to_append(10, 0);
std::iota(std::begin(to_append), std::end(to_append), 0);
//ws1.append(to_append);
xlnt::cell_reference next(1, 1);
for (auto cell : to_append)
{
ws1.get_cell(next).set_value(cell);
std::cout << ws1.get_cell(next) << std::endl;
next.set_column_index(next.get_column_index() + 1);
}
}
closed, mistake from my part
xlnt::row_t row = 1;
for(xlnt::cell_reference(1, row); row < 40; row++)
{
// 10 c by 40 l
std::vector<int> to_append(10, 0);
std::iota(std::begin(to_append), std::end(to_append), 0);
//ws1.append(to_append);
xlnt::cell_reference next(1,row);
for (auto cell : to_append)
{
ws1.get_cell(next).set_value(cell);
std::cout << ws1.get_cell(next) << std::endl;
next.set_column_index(next.get_column_index() + 1);
}
}
in this code :
the ws.append function write after the last cell row reference (11 here) how to write the values at the "A1" cell ? ws1 location of the reference cell