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: 1
Default trying to write a tab-delimited file

I have a straightforward spreadsheet holding 13 columns and 10-120 rows.
Using excel 2007.

I need to alter the values in a column and save the sheet to a tab-delimited
file with a unique filename. This process needs to be repeated for several
columns. To automate the process I open the file with a filenumber and using
'for' loops use print # to write the data. The problem I have is writing the
TAB into the file. I have tried all sorts of ways, ranging from the Tab
argument (which just puts spaces to next print zone) to trying to get the hex
character (0x09) to print.

Is the only way write a tab-delimited file to use the workbook.saveas method
with filetype = xltext?

The code I want to use is of the form:

For i = 1 To 8
For j = 1 To 11
vVal = myArray(i, j)
Print #FileNumber, RTrim(vVal);
Print #FileNumber, <<<TABcharacter
Next j
Print #FileNumber, Spc(1)
Next i

where TABcharacter is 0x09

Am I missing something obvious here??? I hope someone can help, its very
frustrating.
 
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
Converting Tab Delimited Text File to A Comma Delimited Text File Dave Peterson Excel Programming 0 June 13th 07 03:13 PM
Saving multi-tab excel file created from comma delimited text file Marcus Aurelius Excel Programming 2 December 19th 05 05:16 PM
How can I save a file as a comma-delimited text file in Excel? LAM Excel Discussion (Misc queries) 1 May 3rd 05 10:24 PM
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM
Open delimited text file to excel without changing data in that file zohanc Excel Programming 1 October 3rd 03 01:06 AM


All times are GMT +1. The time now is 09:47 AM.

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"