LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Save excel file as another format file

Dear,

I run the following codes, but I can not save the file, and get an error
message. Why?

Dim xlExcelbook As Excel.Workbook
....
xlExcelBook.SaveAs "C:\test.txt", xlTextMSDOS

Err.Number : 1004
Err.Description: Application-defined or object-defined error

I have tested some file format.

They are OK.
xlExcelBook.SaveAs "C:\test.xls"
xlExcelBook.SaveAs "C:\test.htm", xlHtml
xlExcelBook.SaveAs "C:\test.csv", xlCSV
xlExcelBook.SaveAs "C:\test.txt", xlUnicodeText

They can not work, and get an error message.
xlExcelBook.SaveAs "C:\test.csv", xlCSVMac
xlExcelBook.SaveAs "C:\test.csv", xlCSVMSDOS
xlExcelBook.SaveAs "C:\test.csv", xlCSVWindows
xlExcelBook.SaveAs "C:\test.txt", xlTextMac
xlExcelBook.SaveAs "C:\test.txt", xlTextMSDOS
xlExcelBook.SaveAs "C:\test.txt", xlTextWindows

Thanks advance!
Liu jianzhong
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save an excel file to dBase format? rdonohue Excel Discussion (Misc queries) 2 March 28th 09 12:22 AM
How do I save excel file in text format without columns? Tuuti Excel Discussion (Misc queries) 1 July 15th 08 06:40 PM
Format changed if we save our own (.xlt) file as (.csv) in Excel 2 Khayae Excel Discussion (Misc queries) 1 December 14th 07 05:15 PM
Save Excel File in Other Format Shamir Excel Discussion (Misc queries) 0 February 8th 07 04:53 AM
Why will Excel will not save text format in a .csv file davis Excel Worksheet Functions 1 January 25th 06 05:44 PM


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"