Hello.
I am successfully exporting Excel files with a custom name, a dynamic name. I have encountered problems when an address or an institution contained "/" or "\", and it wasn't possible to compose a name.
This is the code, part of it, that I use to generate the xls files:
if "/" $ e._currentRowDataNew.street then
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(STRITRAN(e._currentRowDataNew.street,"/","-"))+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
elseif "\" $ e._currentRowDataNew.street then
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(STRITRAN(e._currentRowDataNew.street,alltrim("\ "),"-"))+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
else
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(e._currentRowDataNew.street)+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
end if
The above code gives me an xls file like:
TEXAS_Str. VILLE nr. 34_LOT 2 day 7- month 3_hour 12-38-29.xls
I need the seconds also if an export is made within the same minute.
The problem is that I don't know how to replace the sign " (not ' + ', but ").
How can I verify that a string contains the sign " ???
Thank you.
I am successfully exporting Excel files with a custom name, a dynamic name. I have encountered problems when an address or an institution contained "/" or "\", and it wasn't possible to compose a name.
This is the code, part of it, that I use to generate the xls files:
if "/" $ e._currentRowDataNew.street then
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(STRITRAN(e._currentRowDataNew.street,"/","-"))+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
elseif "\" $ e._currentRowDataNew.street then
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(STRITRAN(e._currentRowDataNew.street,alltrim("\ "),"-"))+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
else
oWorkbook.ActiveWorkbook.Saveas("C:\files\fd\Devize"+chr(92)+alltrim(e._currentRowDataNew.town)+"_"+alltrim(e._currentRowDataNew.street)+"_"+" LOT "+alltrim(str(e._currentRowDataNew.lot))+"_"+" zi "+alltrim(str(day(now())))+"-"+" month "+alltrim(str(month(now())))+"_"+" ora "+alltrim(str(shortTime_extract(ctot(time()),"h")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"m")))+"-"+alltrim(str(shortTime_extract(ctot(time()),"s")))+".xls",-4143)
end if
The above code gives me an xls file like:
TEXAS_Str. VILLE nr. 34_LOT 2 day 7- month 3_hour 12-38-29.xls
I need the seconds also if an export is made within the same minute.
The problem is that I don't know how to replace the sign " (not ' + ', but ").
How can I verify that a string contains the sign " ???
Thank you.