Solved

How to get rid of spaces between commans in csv file

Posted on 2010-08-16
6
378 Views
Last Modified: 2012-05-10
Hi there:
   I have a csv file which contains the following data

1,2323,32323,545,343
2,23,,   , ,  ,,,
3, 3,4  , , ,,

Is that possible to get rid of those spaces between commas?

thanks

Hui
0
Comment
Question by:HuiShi
6 Comments
 
LVL 6

Accepted Solution

by:
ajarvey earned 500 total points
ID: 33446501
Open the file in Notepad. Search for " , " and replace with ",".. Basically, you want to search for <space><comma><space> and replace with just <comma>.

If this doesn't give the desired result, search and replace different combination's. <comma><space>, <space><comma>, etc.
0
 
LVL 12

Expert Comment

by:tilsant
ID: 33446695
If your data is in cell A1 then u can use this formula to remove spaces:

=SUBSTITUTE(A1," ","")
0
 
LVL 5

Expert Comment

by:truromeo4juliet
ID: 33446705
Ajavey is correct... If all your data is numeric and you want to eliminate ALL spaces, replace " " with ""; you're essentially telling the computer to take out all spaces, anywhere in that file... save it, and viola!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 33446760
Often in a CSV file the spaces are in fact hard spaces so it could also be worth replacing them ..

replace hard space with blank i.e.

HArd space is alt key & 0160 on the number pad then release alt key.
for blank make sure you delete all the data replace with box.

Chris
0
 
LVL 6

Expert Comment

by:ajarvey
ID: 33446792
Just do it through notepad like I've suggested and save yourself a TON of hassle. What I've laid out is the absolute least confusing, and will definitely work.
0
 

Author Comment

by:HuiShi
ID: 33447243
thanks all
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now