File Formatting!

  • Thread starter Thread starter aiyer
  • Start date Start date
A

aiyer

Hello all!

A quick question. I was trying to save a worksheet ina workbook in
certain format. I tried the following two ways.

ActiveSheet.SaveAs FileName:=filesaveName, FileFormat:=xlText
ActiveSheet.SaveAs FileName:=filesaveName, FileFormat:=xlTextWindows

I was wondering what is the difference between the two fileformat
here? Apparantly both work well.

Thanks a bunch.
Regds,

Arun. Iyer
Vtec Cor
 
xlText is not a valid FileFormat enumerator. That's actually a pivottable constant. Coincidentally the value of the xlText constant is the same as that of the FileFormat xlCurrentPlatformText constant

I'm sure the property of FileFormat has a function to determine which platform you're running, and finds out that you're using Windows. So xlTextWindows and xlCurrentPlatformText should ultimately give you the same result. But you should use xlTextWindows as it's probably faster

-Brad Vontur
 
xlText is certainly a valid FileFormat enumerator. It may not be in the
current listing in help, but the current listing didn't have the fancy names
until xl97. Before then it was simply xlText. Obviously the numerical
value is what is actually used and as you stated, they are the same.

Just to elaborate, recording a macro records:

ActiveWorkbook.SaveAs Filename:="C:\Book4.txt", FileFormat:=xlText, _
CreateBackup:=False


Similar before xl97:
? xlPasteFormulas
-4123
? xlFormulas
-4123
? xlPasteSpecialOperationAdd
2
? xlAdd
2

and the list goes on and on.
--
Regards,
Tom Ogilvy

Brad Vontur said:
xlText is not a valid FileFormat enumerator. That's actually a pivottable
constant. Coincidentally the value of the xlText constant is the same as
that of the FileFormat xlCurrentPlatformText constant.
I'm sure the property of FileFormat has a function to determine which
platform you're running, and finds out that you're using Windows. So
xlTextWindows and xlCurrentPlatformText should ultimately give you the same
result. But you should use xlTextWindows as it's probably faster.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top