Jump to content

Excel name + location


---
 Share

Recommended Posts

We are running a large number of in-process inspections, the parts are serialized in 10's - 10-20-30 etc. My query is 2-part: is there a way to make the excel report number the output file automatically according to the serial number, and is there somewhere we can have it saved to a specific directory other than the default "results"?
Link to comment
Share on other sites

  • 3 years later...

Please sign in to view this quote.

Thank you very much for this!

I added time stamp and a little bit of sleep! (Otherwise Calypso 5.4 wasn't happy in my case.)
set CUR_YYYY=%date:~10,4%
set CUR_MM=%date:~4,2%
set CUR_DD=%date:~7,2%
set CUR_HH=%time:~0,2%
if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)

set CUR_NN=%time:~3,2%
set CUR_SS=%time:~6,2%
set CUR_MS=%time:~9,2%

set SUBFILENAME=%CUR_YYYY%%CUR_MM%%CUR_DD%_%CUR_HH%%CUR_NN%%CUR_SS%

timeout /t 5 /nobreak > NUL

taskkill /im excel.exe

set _source="C:\Program Files (x86)\Zeiss\Calypso\home\om\workarea\results"
set _target="\\network_storage\test_folder"

FOR /F "delims=" %%I IN ('DIR %_source%\*.xls /A:-D /O:-D/T:C /B') DO MOVE %_source%\"%%I" %_target%\"%%I"_%SUBFILENAME%.xls & GOTO :EOF
Time stamp source -> https://tecadmin.net/create-filename-wi ... ch-script/
Link to comment
Share on other sites

Please sign in to view this quote.

My apologies. I was only trying to offer info on saving files to a unique location.

Unfortunately, I don't believe saving the actual "Excel" format report anywhere but the Results folder is an option. In the past, the Zeiss Hotline would tell you to save the Characteristics table file as an .xls using Name for Output File as the solution.

I wish I had more to offer.
Link to comment
Share on other sites

 Share

×
×
  • Create New...