From professional translators, enterprises, web pages and freely available translation repositories.
promptok(getdesktopfolder());
promptok(getdesktopfolder());
Last Update: 2018-02-13
Usage Frequency: 1
Quality:
void mainwindow::exportexcel(){ selectcolumnsdlg dlg; if(dlg.execute() != idok) return; officesheet sheet; string fn = appendfilename(getdesktopfolder(), "export.xls"); bool openavailable = sheet.isavailable("open"); bool microsoftavailable = sheet.isavailable("microsoft"); if (openavailable) { sheet.init("open"); } if (microsoftavailable) { sheet.init("microsoft"); } //if (!sheet.opensheet(fn, true)) { sheet.addsheet(true); //} int col=1; #define eq(n,m,a) if (~dlg.n ==1) sheet.setvalue(col++, 1, m); a; eq(opt_number,t_("number"),) eq(opt_address,t_("address"),sheet.setcolwidth(col-1, 60)) eq(opt_time1,t_("time from"),sheet.setcolwidth(col-1, 30)) eq(opt_time2,t_("time to"),sheet.setcolwidth(col-1, 30)) eq(opt_price,t_("price"),) eq(opt_tax,t_("tax"),) eq(opt_makeprice,t_("make price"),) eq(opt_maketax,t_("make tax"),) eq(opt_size,t_("size"),sheet.setcolwidth(col-1, 30)) eq(opt_link,t_("link"),sheet.setcolwidth(col-1, 30)) eq(opt_status,t_("status"),sheet.setcolwidth(col-1, 30)) sheet.select(1, 1, col-1, 1); sheet.setbold(true); int count=0; log("start export--------------------------"); for(int i = 0; i < listobj.getcount() ; i++) { string link = linkcalc(listobj(i,obj_id)); if (listobj(i,id("select")) == 1) { int col=1; #undef eq #define eq(n,m) if (~dlg.n ==1) sheet.setvalue(col++, i+2, m); #define eq1(n,m) if (~dlg.n ==1) m; eq(opt_number,asstring(count+1)) eq(opt_address,asstring(listobj(i,obj_address))) eq(opt_time1,dateconvert().format(listobj(i,obj_time_from))) eq(opt_time2,dateconvert().format(listobj(i,obj_time_to))) eq(opt_price,formatl(listobj(i,obj_price))) eq(opt_tax,asstring(listobj(i,obj_tax))) eq(opt_makeprice,formatl(listobj(i,obj_makeprice))) eq(opt_maketax,asstring(listobj(i,obj_maketax))) eq(opt_size,asstring(listobj(i,obj_size))) eq1(opt_link,sheet.setvalue(col++, i+2,"=hyperlink(\""+link+"\";\"presentation\")")); eq(opt_status,asstring(listobj(i,obj_status))) count++; } } promptok("end export&"+asstring(count)+" lines exported"); log("end export----------------------------"); }
void mainwindow::exportexcel(){ selectcolumnsdlg dlg; if(dlg.execute() != idok) return; officesheet sheet; string fn = appendfilename(getdesktopfolder(), "export.xls"); bool openavailable = sheet.isavailable("open"); bool microsoftavailable = sheet.isavailable("microsoft"); if (openavailable) { sheet.init("open"); } if (microsoftavailable) { sheet.init("microsoft"); } //if (!sheet.opensheet(fn, true)) { sheet.addsheet(true); //} int col=1; #define eq(n,m,a) if (~dlg.n ==1) sheet.setvalue(col++, 1, m); a; eq(opt_number,t_("number"),) eq(opt_address,t_("address"),sheet.setcolwidth(col-1, 60)) eq(opt_time1,t_("time from"),sheet.setcolwidth(col-1, 30)) eq(opt_time2,t_("time to"),sheet.setcolwidth(col-1, 30)) eq(opt_price,t_("price"),) eq(opt_tax,t_("tax"),) eq(opt_makeprice,t_("make price"),) eq(opt_maketax,t_("make tax"),) eq(opt_size,t_("size"),sheet.setcolwidth(col-1, 30)) eq(opt_link,t_("link"),sheet.setcolwidth(col-1, 30)) eq(opt_status,t_("status"),sheet.setcolwidth(col-1, 30)) sheet.select(1, 1, col-1, 1); sheet.setbold(true); int count=0; log("start export--------------------------"); for(int i = 0; i < listobj.getcount() ; i++) { string link = linkcalc(listobj(i,obj_id)); if (listobj(i,id("select")) == 1) { int col=1; #undef eq #define eq(n,m) if (~dlg.n ==1) sheet.setvalue(col++, i+2, m); #define eq1(n,m) if (~dlg.n ==1) m; eq(opt_number,asstring(count+1)) eq(opt_address,asstring(listobj(i,obj_address))) eq(opt_time1,dateconvert().format(listobj(i,obj_time_from))) eq(opt_time2,dateconvert().format(listobj(i,obj_time_to))) eq(opt_price,formatl(listobj(i,obj_price))) eq(opt_tax,asstring(listobj(i,obj_tax))) eq(opt_makeprice,formatl(listobj(i,obj_makeprice))) eq(opt_maketax,asstring(listobj(i,obj_maketax))) eq(opt_size,asstring(listobj(i,obj_size))) eq1(opt_link,sheet.setvalue(col++, i+2,"=hyperlink(\""+link+"\";\"presentation\")")); eq(opt_status,asstring(listobj(i,obj_status))) count++; } } promptok("end export&"+asstring(count)+" lines exported"); log("end export----------------------------"); }
Last Update: 2018-02-13
Usage Frequency: 1
Quality:
Warning: Contains invisible HTML formatting