Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Consolidating tab-delimited text files

I am in the business of consolidating about 60 text files onto one worksheet as follows:
1. Opening a tab-delimited text file in the same folder as ThisWorkbook.
2. Parsing the file a la OpenText
3. Copying all non-empty cells
4. Opening the master workbook
5. Finding the bottom of the worksheet
6. Pasting the cells
7. Repeat for as many txt files as there are in a particular folder. (The files are surveys, with identical numbers of columns but varying numbers of rows.)

Questions:
1. For step 3, would accessing the cells this way (Worksheets("Sheet1").Cells) be workable, or is there a way to easily grab just the non-empty cells? Does it really matter?
2. For step 4, my simple mind would scan down column A looking for the first empty cell. Is there a more efficient way?
3. I'd like to generalize the routine to search only for those txt files in the same folder as ThisWorkbook. I saw a simple line of code that does that here, but now it has escaped me.

Thanks for any help, John
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
Excel adding unwanted tabs to text delimited files Finn Excel Discussion (Misc queries) 1 July 13th 07 05:28 AM
Macro that stores all sheets as tab-delimited text files [email protected] Excel Discussion (Misc queries) 2 February 14th 06 04:02 PM
How do I import/convert tab delimited text files into Excel? jim Excel Worksheet Functions 10 May 3rd 05 10:46 PM
Text to Columns in excel for delimited files - allow trimming opt. D. Young New Users to Excel 1 April 25th 05 05:06 PM
Saving spreadsheets as delimited text files rwebster3[_2_] Excel Programming 2 April 22nd 04 01:46 AM


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