Text Files to .xls

DShilan

New Member
Joined
Feb 23, 2011
Messages
2
<HR style="COLOR: #ebebeb; BACKGROUND-COLOR: #ebebeb" SIZE=1> <!-- / icon and title --><!-- message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_start --><!-- END TEMPLATE: ad_showthread_firstpost_start -->I am running a SQL query that produces a txt file for each day of the year (much faster than running for the year as a whole).

How can I select all of these .TXT files and drop them into a single Excel Worksheet?


Filenames are

BT_01-Sep-10.txt
BT_02-Sep-10.txt
BT_03-Sep-10.txt


etc

And are saved here: C:\Documents and Settings\234641\Desktop\New Folder


Thanks.

Or if i rename them all as .xls, is there a way to make all the data from the different workbooks, appear in just one worksheet?

Dan

<!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
<!-- controls -->
progress.gif
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
If you're going to rename .txt files so that they open directly into Excel, use .csv rather than .xls.

As for making them all appear in one workbook or worksheet, you'd need to run some xl vb code to import the date fromeach file into common workbook/sheet, although this could be relatively straightforward.

HTH
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,733
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top