Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to get rid of spaces between commans in csv file

Posted on 2010-08-16
6
380 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
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 Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

790 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