ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Importing text file with no line delimiters (https://www.excelbanter.com/excel-discussion-misc-queries/93881-importing-text-file-no-line-delimiters.html)

mikewilsonuk

Importing text file with no line delimiters
 

Is there a way to import a text file with no line delimiters without
resorting to VBA? The file I need to import has field-width fields
padded with spaces. The first field of the next row starts immediately
after the end of the last field of the previous row -- there is nothing
to indicate the end of a line/record.

I have used the import wizard to import similar files with line
delimiters and it does just what I need. If there is a way to do the
same thing with this wretched delimiter-free file, I will be very
pleased to hear it.


--
mikewilsonuk
------------------------------------------------------------------------
mikewilsonuk's Profile: http://www.excelforum.com/member.php...o&userid=35404
View this thread: http://www.excelforum.com/showthread...hreadid=551781


Bernie Deitrick

Importing text file with no line delimiters
 
Mike,

No, you need to use VBA, unless the file is less than 256 lines, in which case you could import it
to one cell (subject to the limitation of 32K characters), use Data / Text to columns, and then
transpose the resulting cells.

HTH,
Bernie
MS Excel MVP


"mikewilsonuk" wrote in message
news:mikewilsonuk.29dyt0_1150278305.6441@excelforu m-nospam.com...

Is there a way to import a text file with no line delimiters without
resorting to VBA? The file I need to import has field-width fields
padded with spaces. The first field of the next row starts immediately
after the end of the last field of the previous row -- there is nothing
to indicate the end of a line/record.

I have used the import wizard to import similar files with line
delimiters and it does just what I need. If there is a way to do the
same thing with this wretched delimiter-free file, I will be very
pleased to hear it.


--
mikewilsonuk
------------------------------------------------------------------------
mikewilsonuk's Profile: http://www.excelforum.com/member.php...o&userid=35404
View this thread: http://www.excelforum.com/showthread...hreadid=551781




mikewilsonuk

Importing text file with no line delimiters
 

I feared that would be the answer and have already started learning the
minimum VBA I will need to do this.


--
mikewilsonuk
------------------------------------------------------------------------
mikewilsonuk's Profile: http://www.excelforum.com/member.php...o&userid=35404
View this thread: http://www.excelforum.com/showthread...hreadid=551781


Bernie Deitrick

Importing text file with no line delimiters
 
No need to learn too much - post in the programming group, and you'll get a good start on it.

--
HTH,
Bernie
MS Excel MVP


"mikewilsonuk" wrote in message
news:mikewilsonuk.29eksn_1150306805.9465@excelforu m-nospam.com...

I feared that would be the answer and have already started learning the
minimum VBA I will need to do this.


--
mikewilsonuk
------------------------------------------------------------------------
mikewilsonuk's Profile: http://www.excelforum.com/member.php...o&userid=35404
View this thread: http://www.excelforum.com/showthread...hreadid=551781




mikewilsonuk

Importing text file with no line delimiters
 

I found some code (in the help I think), copied & pasted it, hacked it
around a bit and added a 'load file' button to the sheet. It works
fine. As you say, there wasn't too much to learn. Thanks for your
advice.


--
mikewilsonuk
------------------------------------------------------------------------
mikewilsonuk's Profile: http://www.excelforum.com/member.php...o&userid=35404
View this thread: http://www.excelforum.com/showthread...hreadid=551781



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com