Jump to content
Sign in to follow this  
ThomasQ

Saving XLS files with variables in the filename

Recommended Posts

ThomasQ

Hi!

In my For.. Next Loop I save XLS files. I'm trying to figure out how I can let the loop save the file with a different name everytime. In one scenario I'd like to have an increasing number (Customer1, Customer2, Customer33, etc).. In a another script I need to save with a part of a specific string I gathered earlier on in the script (CustomerID-0003.xls, CustomerID-18749.xls, CustomerID-2458.xls, etc).

How do I do this?? Do I need to add some variable to the _ExcelBookSave line, or do I have to generate the filename before I save?

Many Thanks in advance!!

Share this post


Link to post
Share on other sites
colafrysen

Increasing numbers:

For $X=0 to 10 Step 1

FileSaveFunctionThatYouUse("FileName" & $X)

Next

Custom data:

FileSaveFunctionThatYouUse("FileName" & $TheDataThatYouAcquiredEarlier)

Use _ExcelBookSaveAs() for saving


[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]

Share this post


Link to post
Share on other sites
ThomasQ

Excellent! Thanks!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×