Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
text file with tab
I would like to export some data (with tab delimiter) from excel, with
HEADER which is string, to .txt file. In exported .txt file, I get quotation (" ") for string which I don't want. I have written: Open "test.txt" for output as #1 print #1, "Time", tab, "Average" for i = 1 to lastrow Print #1, sheets("test").Cells(i,1), tab, sheets("test").Cells(i,3) next i I want the text file as: Time (Tab) Average 1/1/1999 (Tab) 3.5 1/2/1999 (Tab) 5.5 Could you please help me out? Thanks, Nazrul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
text file with tab
Try
Open "H:\test.txt" For Output As #1 Print #1, "Time", vbTab, "Average" For i = 1 To lastrow Print #1, Sheets("sheet1").Cells(i, 1), vbTab, Sheets("sheet1").Cells(i, 3) Next i Close #1 -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Nazrul" wrote in message ... I would like to export some data (with tab delimiter) from excel, with HEADER which is string, to .txt file. In exported .txt file, I get quotation (" ") for string which I don't want. I have written: Open "test.txt" for output as #1 print #1, "Time", tab, "Average" for i = 1 to lastrow Print #1, sheets("test").Cells(i,1), tab, sheets("test").Cells(i,3) next i I want the text file as: Time (Tab) Average 1/1/1999 (Tab) 3.5 1/2/1999 (Tab) 5.5 Could you please help me out? Thanks, Nazrul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
How to tell number of spaces between values in saved text file fromthe original xls file | Excel Discussion (Misc queries) | |||
How do I import text file, analyze data, export results, open next file | Excel Programming | |||
Excel VBA - open text file, replace text, save file? | Excel Programming | |||
importing text file, removing data and outputting new text file | Excel Programming |