Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Batch Convert TXT to XLS ?

Thread Tools
 
Search this Thread
 
Old 21 September 2006, 04:36 PM
  #1  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default Batch Convert TXT to XLS ?

Anyone got a free program/script/macro to batch convert a folder of delimited text files to Excel ? They are all space delimited files with the text qualified using quotes. Too much of a pain to do hundreds of them manually

Help ! Thanks.
Old 21 September 2006, 05:05 PM
  #2  
bioforger
Scooby Regular
iTrader: (1)
 
bioforger's Avatar
 
Join Date: Jan 2002
Location: Pig Hill, Wiltsh1te
Posts: 16,995
Received 5 Likes on 5 Posts
Default

Save the txt files as csv instead? Then u can open them up straight away in Excel without having to use the wizard.
Old 21 September 2006, 05:31 PM
  #3  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default

Originally Posted by bioforger
Save the txt files as csv instead? Then u can open them up straight away in Excel without having to use the wizard.
Won't work as they are not comma delimited, but space delimited, it just throws them all into one column. I inherited the files unfortunately, they're not of my making.

I managed it in the end using a similar method though. Used good old TextPad to replace all instances of " " in all files with a comma, then removed and spare quotes, renamed the extensions in DOS and jobs a good un Just means I have to save them all as xls files now, but at least it saves on the text import wizard palaver.
Old 21 September 2006, 05:40 PM
  #4  
Hanslow
Scooby Regular
 
Hanslow's Avatar
 
Join Date: Mar 2001
Location: Derbyshire
Posts: 4,496
Likes: 0
Received 0 Likes on 0 Posts
Default

I was about to suggest doing some scripts to replace " " with "," then just load them in as CSV.... too late now
Old 21 September 2006, 05:58 PM
  #5  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default

Thanks anyway You know what is like, you come across a problem, post it up on SN and no sooner have you pressed 'Submit New Thread' it comes to you like a flash
Old 21 September 2006, 07:05 PM
  #6  
Dracoro
Scooby Regular
 
Dracoro's Avatar
 
Join Date: Sep 2001
Location: A powerslide near you
Posts: 10,261
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by DJ Dunk
Won't work as they are not comma delimited, but space delimited, it just throws them all into one column. I inherited the files unfortunately, they're not of my making.
You CAN do this in Excel without any amendments to the files. Open Excel then open the file and by default, use the text import wizard using space as the delimiter and field qualifiers as "" if need be.

If you've already got it in excel in one column, you can still do the same thing. Use the menu: Data>Text to columns. They are one and the same thing as the text import wizard really.

And it DOES work as I've just tested it.
Old 21 September 2006, 07:11 PM
  #7  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default

Of course, but the problem was that I don't fancy doing that 119 times There are lots of files so using the text import wizard is a pain. MS haven't updated the crappy wizard since I started with Excel 4 It does the job, but needs batch processing.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
SilverM3
ScoobyNet General
8
24 February 2021 01:03 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
makkink
General Technical
10
01 October 2015 05:41 PM
yabbadoo4
ScoobyNet General
11
30 September 2015 10:33 PM



Quick Reply: Batch Convert TXT to XLS ?



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