dear all,,

I just try to make script to autosave an opened excel that auto refresh every 3 hours. Every 3 hours the data will be added to excel,, cause the excel will take data from database (that the cause I need to autorefresh).

but I need to autosave it too. I use M.Office 2003. In M. Office 2003, the output of autosave just a temporary. So I just, copy the temporary, n rename it. But, I want to make it, just to make command from CMD to save my opened excel that every 3 hours will be added.

tiil now, I just make this code :

for /F "usebackq" %%A IN (`dir /O:D /B *.xls`) do (
set FI=%%A
)
ren %fi% sample.xls
del D:\db_duplicate\sample.xls
xcopy sample.xls D:\db_duplicate\

Recommended Answers

All 4 Replies

You're trying to do too much without integrating natively with Excel or using COM. You can use vba automation or have an application control the Excel instance but i'm afraid the way you're trying to go about this isn't safe and will likely lead to data loss.

application control the Excel,,,,
can u give that... or link to that application??

thanks for the clue/....

application control the Excel,,,,
can u give that... or link to that application??

thanks for the clue/....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.