Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default working with large text files

Hello.

I have a text file which has over 65536 rows.

I'd like to import the whole thing into Excel... multiple sheets is fine.

So, I need to put the first 65k+ (or half, it doesn't matter) rows on one
sheet, and the rest on another. I could do that manually, easy enough, but
it will need to be done again, with data that will change, etc.

To do that programatically, I could open the file and walk through reading
and placing the lines.

My question is if anyone has a good suggestion as to how to do that more
quickly than reading through over 65k lines individually... a method to read
half of the file in on one sheet, and the second half of the file in on
another sheet. I think it's safe to assume, for this purpose, that it will
never have more rows than in two sheets.

Thanks.
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default working with large text files

If these records are in an array, you can simply assign a range to them as
opposed to cycling through them.
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


"mark" wrote:

Hello.

I have a text file which has over 65536 rows.

I'd like to import the whole thing into Excel... multiple sheets is fine.

So, I need to put the first 65k+ (or half, it doesn't matter) rows on one
sheet, and the rest on another. I could do that manually, easy enough, but
it will need to be done again, with data that will change, etc.

To do that programatically, I could open the file and walk through reading
and placing the lines.

My question is if anyone has a good suggestion as to how to do that more
quickly than reading through over 65k lines individually... a method to read
half of the file in on one sheet, and the second half of the file in on
another sheet. I think it's safe to assume, for this purpose, that it will
never have more rows than in two sheets.

Thanks.
Mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default working with large text files

If these records are in an array, you can simply assign a range to them as
opposed to cycling through them.


I'm not quite sure if that answers my question or not.

The records are currently in a text file, totally outside of Excel... just a
plain flat file.

Once I get them into Excel, sure, I can assign a range name to them.

But the question was about methods of splitting the flat text file and
getting them into Excel.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default working with large text files

see if this will help

http://support.microsoft.com/default...b;en-us;120596

--


Gary


"mark" wrote in message
...
Hello.

I have a text file which has over 65536 rows.

I'd like to import the whole thing into Excel... multiple sheets is fine.

So, I need to put the first 65k+ (or half, it doesn't matter) rows on one
sheet, and the rest on another. I could do that manually, easy enough,
but
it will need to be done again, with data that will change, etc.

To do that programatically, I could open the file and walk through reading
and placing the lines.

My question is if anyone has a good suggestion as to how to do that more
quickly than reading through over 65k lines individually... a method to
read
half of the file in on one sheet, and the second half of the file in on
another sheet. I think it's safe to assume, for this purpose, that it
will
never have more rows than in two sheets.

Thanks.
Mark



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default working with large text files

Thanks, Gary.

As you likely know, the code on that post cycles through importing one row
at a time, so as it says, it will run a good while.

I was hoping that there was a way to read the size of the file, or
preferably, the number of lines in the file, and import half of it as a chunk.

But perhaps not.

Thanks.

"Gary Keramidas" wrote:

see if this will help

http://support.microsoft.com/default...b;en-us;120596

--


Gary


"mark" wrote in message
...
Hello.

I have a text file which has over 65536 rows.

I'd like to import the whole thing into Excel... multiple sheets is fine.

So, I need to put the first 65k+ (or half, it doesn't matter) rows on one
sheet, and the rest on another. I could do that manually, easy enough,
but
it will need to be done again, with data that will change, etc.

To do that programatically, I could open the file and walk through reading
and placing the lines.

My question is if anyone has a good suggestion as to how to do that more
quickly than reading through over 65k lines individually... a method to
read
half of the file in on one sheet, and the second half of the file in on
another sheet. I think it's safe to assume, for this purpose, that it
will
never have more rows than in two sheets.

Thanks.
Mark






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
Extracting data from large text files for beginner [email protected] Excel Worksheet Functions 1 November 12th 08 09:23 AM
Importing Large Text Files lotstolearn Excel Discussion (Misc queries) 1 September 26th 08 08:55 PM
Text Import Wizard (use for large files) Traci Excel Discussion (Misc queries) 2 November 14th 06 03:12 AM
Opening large text files freekrill Excel Discussion (Misc queries) 6 September 7th 05 04:44 AM
VBA Excel: Opening Very Large Text Files [email protected] Excel Programming 6 September 21st 03 07:30 PM


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

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"