PDA

View Full Version : Naming a file


tomkrier
July 19th, 2005, 06:33 PM
What I want to do is 'add data to file' and 'overwrite table' in file: 'table.xls'. But I want to export table.xls as the name 'table[&yy][&mm][&dd].xls'. The problem is that it will try to create a new table if I use the date. Is there anyway to do this easily? I can think of some complicated ways, but I wanted to make sure there wasn't an easy way.

Gareth Horton
July 20th, 2005, 01:57 PM
Tom

There is no easy way to do this, as what you need is the ability to specify a worksheet to delete first, before you add the new worksheet based on todays date.

That would have to be done in script.

Is the problem that there are other worksheets in this file, as well as the one that (presumably) always reflect todays date, so you cannot simply overwrite the file?

Gareth

Originally posted by tomkrier:
What I want to do is 'add data to file' and 'overwrite table' in file: 'table.xls'. But I want to export table.xls as the name 'table[&yy][&mm][&dd].xls'. The problem is that it will try to create a new table if I use the date. Is there anyway to do this easily? I can think of some complicated ways, but I wanted to make sure there wasn't an easy way.

tomkrier
July 20th, 2005, 03:40 PM
Turns out the user doesn't need to have the date as part of the file name, but what I was thinking to do was run a batch file to rename the file to tomorrows date so when it ran the next day, it added data to the correct file.