Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting a tab delimiter


Hi,
I am opening a text file within excel. For the file to be properly
formatted within excel, it is necessary to field delimited using a
tab.

Is it possible to determine if the text file being imported is tab
delimited?

I am using the following to open the text file.

Code:
--------------------
Sub Open_File(My_File)

Workbooks.OpenText Filename:=My_File
, Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
Tab:=True, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), _
Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), _
Array(11, 1), Array(12, 1)), TrailingMinusNumbers:=True
My_File = ActiveWorkbook.Name

End Sub
--------------------


The reason I want to do this is that if the text file is not tab
delimited, the data will be 'skewed' in excel.


--
PLPE
------------------------------------------------------------------------
PLPE's Profile: http://www.excelforum.com/member.php...o&userid=23856
View this thread: http://www.excelforum.com/showthread...hreadid=388331

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting a tab delimiter


Great. I asked the same question yesterday and have gotten no replie
yet. I will anxiously await the results of this thread. :

--
Loss
-----------------------------------------------------------------------
Losse's Profile: http://www.excelforum.com/member.php...fo&userid=2481
View this thread: http://www.excelforum.com/showthread.php?threadid=38833

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting a tab delimiter


Until we get a reply, you could just try inserting the tab after th
file is already opened:

Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1")
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False
FieldInfo _
:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=Tru

--
Loss
-----------------------------------------------------------------------
Losse's Profile: http://www.excelforum.com/member.php...fo&userid=2481
View this thread: http://www.excelforum.com/showthread.php?threadid=38833

Reply
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
CSV - no delimiter at end of line cats_five Excel Discussion (Misc queries) 1 March 19th 10 09:25 AM
point as delimiter Amber Excel Discussion (Misc queries) 1 April 14th 09 04:55 PM
Comma delimiter Jon Quixley Excel Worksheet Functions 1 July 25th 06 04:47 PM
Tab Delimiter File moonwalker Excel Discussion (Misc queries) 7 February 24th 06 03:56 PM
How do I set the delimiter to save as a CSV? Jeroen Hofs Excel Programming 4 July 19th 05 09:27 AM


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

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

About Us

"It's about Microsoft Excel"