PC Review


Reply
Thread Tools Rate Thread

Importing large tab-delimited text files?

 
 
Mark R-S
Guest
Posts: n/a
 
      23rd Dec 2003
I deal with very large data sets that are in tab-delimited .txt format.
Many times, there are more than 256 columns of data.

The Microsoft Knowledge Base had an article titled "Sample Macro to Import
Data with More Than 256 Fields or Columns". This could do the trick for me
if I could modify the macro to accomodate tab-delimited formats.

Q1: Could anyone tell me how to modify the macro described above for
tab-delimited .txt files?

Q2: Does anyone know of a bulk file conversion utility that would change a
tab-delimited text file to a CSV format?

Thanks a bunch,

Mark R-S


 
Reply With Quote
 
 
 
 
Ritujoy
Guest
Posts: n/a
 
      24th Dec 2003
Mark, perhaps you could try to import first into an Access table and
then just parse the Access table into Excel, or just leave it in
Access depending on what you're doing.

ryan




"Mark R-S" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> I deal with very large data sets that are in tab-delimited .txt format.
> Many times, there are more than 256 columns of data.
>
> The Microsoft Knowledge Base had an article titled "Sample Macro to Import
> Data with More Than 256 Fields or Columns". This could do the trick for me
> if I could modify the macro to accomodate tab-delimited formats.
>
> Q1: Could anyone tell me how to modify the macro described above for
> tab-delimited .txt files?
>
> Q2: Does anyone know of a bulk file conversion utility that would change a
> tab-delimited text file to a CSV format?
>
> Thanks a bunch,
>
> Mark R-S

 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      24th Dec 2003
Access has a limit of 256 columns as well, doesn't it?

--
Regards,
Tom Ogilvy

Ritujoy <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Mark, perhaps you could try to import first into an Access table and
> then just parse the Access table into Excel, or just leave it in
> Access depending on what you're doing.
>
> ryan
>
>
>
>
> "Mark R-S" <(E-Mail Removed)> wrote in message

news:<(E-Mail Removed)>...
> > I deal with very large data sets that are in tab-delimited .txt format.
> > Many times, there are more than 256 columns of data.
> >
> > The Microsoft Knowledge Base had an article titled "Sample Macro to

Import
> > Data with More Than 256 Fields or Columns". This could do the trick

for me
> > if I could modify the macro to accomodate tab-delimited formats.
> >
> > Q1: Could anyone tell me how to modify the macro described above for
> > tab-delimited .txt files?
> >
> > Q2: Does anyone know of a bulk file conversion utility that would

change a
> > tab-delimited text file to a CSV format?
> >
> > Thanks a bunch,
> >
> > Mark R-S



 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      24th Dec 2003
change this line


WorkResult = Right(WorkResult, Len(WorkResult) - InStr(1, WorkResult, ","))
CommaCount = CommaCount + 1

to


WorkResult = Right(WorkResult, Len(WorkResult) - InStr(1,
WorkResult, vbTab))
CommaCount = CommaCount + 1


in both lines that look like this:


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

Change Tab:=False to Tab:=True

change comma:=True to comma:=False

--
Regards,
Tom Ogilvy



Mark R-S <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I deal with very large data sets that are in tab-delimited .txt format.
> Many times, there are more than 256 columns of data.
>
> The Microsoft Knowledge Base had an article titled "Sample Macro to Import
> Data with More Than 256 Fields or Columns". This could do the trick for

me
> if I could modify the macro to accomodate tab-delimited formats.
>
> Q1: Could anyone tell me how to modify the macro described above for
> tab-delimited .txt files?
>
> Q2: Does anyone know of a bulk file conversion utility that would change

a
> tab-delimited text file to a CSV format?
>
> Thanks a bunch,
>
> Mark R-S
>
>



 
Reply With Quote
 
Ritujoy
Guest
Posts: n/a
 
      24th Dec 2003
That's correct. Please ignore my advice.


"Tom Ogilvy" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> change this line
>
>
> WorkResult = Right(WorkResult, Len(WorkResult) - InStr(1, WorkResult, ","))
> CommaCount = CommaCount + 1
>
> to
>
>
> WorkResult = Right(WorkResult, Len(WorkResult) - InStr(1,
> WorkResult, vbTab))
> CommaCount = CommaCount + 1
>
>
> in both lines that look like this:
>
>
> Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited,
> _
> TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
> Tab:=False, _
> Semicolon:=False, Comma:=True, Space:=False, Other:=False,
> FieldInfo _
> :=Array(Array(1, 1), Array(2, 1), Array(3, 1))
>
> Change Tab:=False to Tab:=True
>
> change comma:=True to comma:=False
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> Mark R-S <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I deal with very large data sets that are in tab-delimited .txt format.
> > Many times, there are more than 256 columns of data.
> >
> > The Microsoft Knowledge Base had an article titled "Sample Macro to Import
> > Data with More Than 256 Fields or Columns". This could do the trick for

> me
> > if I could modify the macro to accomodate tab-delimited formats.
> >
> > Q1: Could anyone tell me how to modify the macro described above for
> > tab-delimited .txt files?
> >
> > Q2: Does anyone know of a bulk file conversion utility that would change

> a
> > tab-delimited text file to a CSV format?
> >
> > Thanks a bunch,
> >
> > Mark R-S
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert large text to large number Jennifer Microsoft Access 5 22nd Oct 2009 01:12 AM
LARGE 1, LARGE 2, LARGE 3, LARGE 4 jeel Microsoft Excel Worksheet Functions 2 30th Jan 2008 07:05 AM
Importing text files containing large text Sharp Microsoft Access 1 25th Jan 2005 11:25 AM
Re: Importing a large text file (>65536) Chip Pearson Microsoft Excel Programming 0 18th May 2004 09:24 PM
Importing large text file into Excel - limited Gurdev Microsoft Excel Misc 1 11th Jul 2003 05:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:39 PM.