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

I want to import a range of data from a text file into Excel. I can specify
the starting row, but can't find a way to specify the ending row. Is it
possible to do this? Does anybody have code that will do it?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Import data from the middle of a text file

Why not just delete the rows you don't want after it is imported?

What method are you using (post the code)

--
Regards,
Tom Ogilvy

"Caol D" <Caol wrote in message
...
I want to import a range of data from a text file into Excel. I can

specify
the starting row, but can't find a way to specify the ending row. Is it
possible to do this? Does anybody have code that will do it?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import data from the middle of a text file

Yes, I can do that, but I will be working with hundreds of files with
thousands of rows of data.
For example, I have files with 8K rows, and only want to use a range of 100
rows.

I'm trying to find a way to not have to import so much data in the first
place.

Carol

"Tom Ogilvy" wrote:

Why not just delete the rows you don't want after it is imported?

What method are you using (post the code)

--
Regards,
Tom Ogilvy

"Caol D" <Caol wrote in message
...
I want to import a range of data from a text file into Excel. I can

specify
the starting row, but can't find a way to specify the ending row. Is it
possible to do this? Does anybody have code that will do it?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Import data from the middle of a text file

How do you know which lines you want to import. It seems to me you either
have to traverse the text file line by line to determine what you need or you
might be able to get away with an ADO recordset. Check out this link

http://www.erlandsendata.no/english/...adacconnstring

to find the connection string to use to connect to a text file.
--
HTH...

Jim Thomlinson


"Carol D" wrote:

Yes, I can do that, but I will be working with hundreds of files with
thousands of rows of data.
For example, I have files with 8K rows, and only want to use a range of 100
rows.

I'm trying to find a way to not have to import so much data in the first
place.

Carol

"Tom Ogilvy" wrote:

Why not just delete the rows you don't want after it is imported?

What method are you using (post the code)

--
Regards,
Tom Ogilvy

"Caol D" <Caol wrote in message
...
I want to import a range of data from a text file into Excel. I can

specify
the starting row, but can't find a way to specify the ending row. Is it
possible to do this? Does anybody have code that will do it?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import data from the middle of a text file

I have about 200 "types" of data files. Each type has a specific number of
rows. I have a matrix that will tell me what range of lines to extract for
each "type" of file.

Thanks for the link. I think I can use the information there to do what I
need to do.

"Jim Thomlinson" wrote:

How do you know which lines you want to import. It seems to me you either
have to traverse the text file line by line to determine what you need or you
might be able to get away with an ADO recordset. Check out this link

http://www.erlandsendata.no/english/...adacconnstring

to find the connection string to use to connect to a text file.
--
HTH...

Jim Thomlinson


"Carol D" wrote:

Yes, I can do that, but I will be working with hundreds of files with
thousands of rows of data.
For example, I have files with 8K rows, and only want to use a range of 100
rows.

I'm trying to find a way to not have to import so much data in the first
place.

Carol

"Tom Ogilvy" wrote:

Why not just delete the rows you don't want after it is imported?

What method are you using (post the code)

--
Regards,
Tom Ogilvy

"Caol D" <Caol wrote in message
...
I want to import a range of data from a text file into Excel. I can
specify
the starting row, but can't find a way to specify the ending row. Is it
possible to do this? Does anybody have code that will do it?





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
Import data from text file jjk98 Excel Discussion (Misc queries) 0 January 13th 10 02:56 PM
import data from a text file jonny365 Excel Discussion (Misc queries) 0 September 6th 05 03:42 PM
How do I import text file, analyze data, export results, open next file Geoffro Excel Programming 2 March 6th 05 08:02 PM
how to import data from text file which has more 70k rows ? meh Excel Programming 1 January 16th 04 05:14 PM
Get External Data, Import Text File, File name problem Scott Riddle Excel Programming 1 July 11th 03 05:40 PM


All times are GMT +1. The time now is 10:41 AM.

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

About Us

"It's about Microsoft Excel"