Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- */
- std::cout << "ahoj\n";
- try
- {
- Python py(argc, argv);
- py.run_file("gut.py");
- std::string ilosc_pilkarzy = std::to_string(pilkarze_all.size());
- py.run_string("ws1.cell(row = 1, column = 2, value = " + ilosc_pilkarzy + ")");
- int r = 2;
- for(auto gracz : pilkarze_all)
- {
- std::string row = std::to_string(r);
- // brakuje ID
- py.run_string("ws1.cell(row = " + row + ", column = 2, value = " + gracz["name"] + ")");
- py.run_string("ws1.cell(row = " + row + ", column = 3, value = " + gracz["age"] + ")");
- py.run_string("ws1.cell(row = " + row + ", column = 4, value = " + gracz["birth_city"] + ")");
- py.run_string("ws1.cell(row = " + row + ", column = 5, value = " + gracz["birth_state"] + ")");
- py.run_string("ws1.cell(row = " + row + ", column = 6, value = " + gracz["birth_date"] + ")");
- r++;
- }
- py.run_string("wb.save('document.xlsx')");
- }
- catch (Python_exception ex)
- {
- std::cout << "\nerr\n";
- std::cout << ex.what();
- }
- curl_global_cleanup();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement