Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Importing from a text file

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Importing from a text file

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.

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


"Robert" wrote in message
oups.com...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Importing from a text file

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?

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
Importing CSV file (saved as Text) into XL as Text -- over 60 colu sbp Excel Discussion (Misc queries) 1 October 14th 06 11:50 PM
Importing text file, only option to edit existing file smokey99 Excel Discussion (Misc queries) 8 April 26th 06 09:08 PM
Importing text file Jeff Excel Discussion (Misc queries) 1 April 4th 06 01:45 PM
Importing Text File Bean123r Excel Discussion (Misc queries) 3 July 20th 05 10:20 PM
importing text file, removing data and outputting new text file Pal Excel Programming 8 February 27th 04 08:32 PM


All times are GMT +1. The time now is 08:51 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"