Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Importing from a text file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert - 15 Feb 2007 23:42 GMT
I'm having issues using the Public Sub ImportTextFile from the
cpearson site.  I am trying to import a datafile that was written
using VMS's DCL language.  When I manually copy and paste the data
into an excel sheet, the file shows up correctly.  When I try and use
the ImportTextFile to do it instead, it puts all the data in cell A1.

I will gladly send someone some sample output -- if I paste it here
the carriage return is changed and then it magically works.

I think there is a problem with the way the carriage return is
interperated, but I'm not sure.  Does anyone know a way to import into
excel from VMS so it shows up correctly?
Chip Pearson - 16 Feb 2007 00:38 GMT
Make sure you are using the correct delimiter character and that the lines
in the text file end with vbNewLine. It sounds like the code isn't finding
the specified delimiter characters in the imported text, and therefore
doesn't split apart the columns and rows.

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

> I'm having issues using the Public Sub ImportTextFile from the
> cpearson site.  I am trying to import a datafile that was written
[quoted text clipped - 8 lines]
> interperated, but I'm not sure.  Does anyone know a way to import into
> excel from VMS so it shows up correctly?
Robert - 16 Feb 2007 17:30 GMT
I actually don't want a delimiter -- the code I use is expecting all
the content to be in Column A.  I just want all the individual lines
from the text file put on a single row in Column A.  Will the
ImportTextFile program work without delimiters?  And I'm not sure what
kind of carriage return is at the end of each line.  Do you know of a
way to find the ascii value and convert it to a vbNewLine character?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.