I'm trying to output some data from MySQL to an excel file using libxlsxwriter library in c++. I have a problem in changing the output directory of the excel file. from this code, it saves to the original folder where the .cpp file located. Can anyone tell me a way to change the output location of the excel file.
string na = " Batch Report.xlsx";
string c = RpotBno + na;
const char *name = c.c_str();
lxw_workbook *workbook = workbook_new(name);
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
worksheet_set_paper(worksheet, 9);
worksheet_set_landscape(worksheet);
workbook_read_only_recommended(workbook);