saving excel file as tab delimited text programmatically

P

Philip

i'm using the following script to save the excel file as tab delimited text.
although the file it produces and the manually saved file seems to be
similar they are slightly different when i compare them by fc.exe even their
sizes equal. i am using office 2002 English, there is an issue reported for
office 2000 in microsoft site but nothing about this one. is it really an
issue or what should i do to get the similar effect for programmatic save?

Dim objXL
Set objXL = WScript.CreateObject("Excel.Application")
'
' open file
'
objXL.Workbooks.Open("C:\d.xls")
'objXL.Visible = true

'close workbook AFTER saving
objXL.DisplayAlerts = False 'disable the overwrite? prompt, JUST DO IT
objXL.ActiveWorkbook.SaveAs "C:\d.txt", -4158
objXL.Workbooks.Close
objXL.DisplayAlerts = True 'reenable prompts
 

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

Top