2018-08-01 15:36:41 +02:00
|
|
|
#include "excelreader.h"
|
|
|
|
|
|
|
|
#include <xlnt/xlnt.hpp>
|
|
|
|
|
|
|
|
void ExcelReader::readSellersFromFile(const std::string& filename, Marketplace* market)
|
|
|
|
{
|
|
|
|
xlnt::workbook wb;
|
|
|
|
wb.load(filename);
|
|
|
|
auto ws = wb.sheet_by_index(0);
|
|
|
|
|
|
|
|
const int START_ROW = 6;
|
|
|
|
const int END_ROW = 349;
|
|
|
|
|
2018-08-01 15:55:13 +02:00
|
|
|
int rowCount{};
|
2018-08-01 15:36:41 +02:00
|
|
|
for (const auto& row : ws.rows(false)) {
|
2018-08-01 15:55:13 +02:00
|
|
|
// auto test = row[0].value<int>();
|
|
|
|
if (rowCount < START_ROW)
|
|
|
|
continue;
|
|
|
|
std::cout << row[0].to_string() << "\n";
|
|
|
|
rowCount++;
|
2018-08-01 15:36:41 +02:00
|
|
|
}
|
2018-08-01 15:55:13 +02:00
|
|
|
}
|