Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a VBScript called from desktops that writes start / end times to a tab delimited file (with an .xls extension) as a timelog.

When someone opens this file in Excel, and then wants to close it, it warns:

Are you sure you want to keep it in this format? You will lose things etc...

The issue is that if someone answers NO they aren't sure, it still saves as the same file name, but no longer tab delimited.

Can an individual file be flagged internally - or in some other way - so that saving in a format other than tab delimited is impossible? I realize this format will not allow me a macro on the before save event, so any other ideas?

Implementing this solution followup

As a warning, if you write to a file in csv format, as I did, remember, logging input such as currency, or content with commas in the input will alter the column layout. The solution is to wrap the input strings in quotes.

share|improve this question
What version of Excel? – music2myear Sep 3 '11 at 2:22
Can you change the VBScript? (ie: to output a .CSV instead of a 'fake' .XLS) :) – Ƭᴇcʜιᴇ007 Sep 3 '11 at 2:34
excel 2003, and perhaps output to csv is a good idea, I had not considered that. will try it at least. – datatoo Sep 3 '11 at 3:18
@techie007 if you made you suggestion an answer I would accept it. Changing to a csv format actually seems to be the best solution, and is pretty easy. Thanks – datatoo Sep 3 '11 at 17:43
@dataoo - I'll stick the idea in an answer. :) – Ƭᴇcʜιᴇ007 Sep 3 '11 at 17:48
up vote 1 down vote accepted

If you can change the VBScript then perhaps adjust it to output a .CSV instead of a 'fake' .XLS.

That way excel should know is a comma (or 'tab' in your case) delimited file and treat it as such.

share|improve this answer
Thanks, should have thought of this myself. This was a good idea – datatoo Sep 4 '11 at 10:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .