Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
What version of Excel? –  music2myear Sep 3 '11 at 2:22
2  
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.