Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save a workbook using FileFormat in .txt but with data in csv for
Hi all,
I have a workbook with data in rows and columns and I want to save it as a csv text file but with a .txt extension and not a .csv extension. This .txt file is then read by another programm. If I save it with the Excel available .txt extensions, the txt file produced is always a tab file. The only code that produces the format I am looking for is: ActiveWorkbook.SaveAs filename:=Range("A3").Value, FileFormat:=xlCSV, CreateBackup:=False ChDir "C:\Documents and Settings\Administrador\Escritorio" but the file produced is with a .csv extension and what I want is a .txt I really need to produce it direct and not have to use the Office rename function. Any ideas? Thks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save a workbook using FileFormat in .txt but with data in csv for
Yves,
If your Range("A3") ends in ".txt" or you change the line saving to; ActiveWorkbook.SaveAs filename:=Range("A3").Value & ".txt", FileFormat:=xlCSV, CreateBackup:=False That wil force the filename to finish .txt not .csv Regards, Chris. -- Chris Marlow MCSD.NET, Microsoft Office XP Master "Yves" wrote: Hi all, I have a workbook with data in rows and columns and I want to save it as a csv text file but with a .txt extension and not a .csv extension. This .txt file is then read by another programm. If I save it with the Excel available .txt extensions, the txt file produced is always a tab file. The only code that produces the format I am looking for is: ActiveWorkbook.SaveAs filename:=Range("A3").Value, FileFormat:=xlCSV, CreateBackup:=False ChDir "C:\Documents and Settings\Administrador\Escritorio" but the file produced is with a .csv extension and what I want is a .txt I really need to produce it direct and not have to use the Office rename function. Any ideas? Thks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When I save a workbook(2007) w/ a data connection to htm no data? | Excel Discussion (Misc queries) | |||
save data in another workbook | Excel Programming | |||
Too much data to save a workbook | New Users to Excel | |||
save format & data to new workbook | Excel Programming | |||
Save Workbook using List Box Data | Excel Programming |