raw data conversion issue

TwylaG

Board Regular
Joined
Jun 6, 2008
Messages
101
I have some raw data in txt format that has an issue in that every second "character" is a space. I have no idea how that happened as it should be neat little columns of data. Is there a way I can remove the spaces when I import the data without removing *all* the spaces. Eg, a word or number appears C o l u m n 1 _______ $ 1 0 0 0 . 0 0_______ C o l u m n 3 etc (where the underscores are meant to represent more spaces, but when I typed them in here they got junked) and I don't want to lose the distinction between columns, just the gaps between characters.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
It sounds to me like you might be importing unicode text (two bytes per character rather than one byte per character). Where's the text file coming from? How are you importing it?
 
Upvote 0
The text file is coming from an AS400 and in text form its fine. However the file had since been archived to Google drive/docs & when we had to go back a ways and look at or download older files, they have all these spaces in now.
 
Upvote 0
How's it being imported? Looks don't matter - it's entirely possible for Google to convert the files to unicode when they are archived. If you can, download Notepad++ (it's free) and inspect the file format (it will display in the bottom right corner).

Or another quick test would be to open the file with Notepad (the ordinary rinky dinky Windows version) and do a File | Save As being sure to choose ANSI encoding.
 
Upvote 0
here is the first line, which is all text before the columning starts that I have been playing with using all sorts of Trim variations. Nothing is much working; though Trim is removing some of the spaces, not the ones between the letters. I am testing right now if copying and pasting into php (this is a php forum, right? - its been too long since I was in the loop) and then out of php will do anything to the text so that Trim will work.
? S L E 0 0 2 - 1 0 2 / 0 1 / 2 0 1 3 0 9 : 4 8 : 1 4 S U B - L E D G E R - O U T S T A N D I N G P A G E 1
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

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