?
Solved

How to get rid of spaces between commans in csv file

Posted on 2010-08-16
6
Medium Priority
?
384 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
[X]
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
6 Comments
 
LVL 6

Accepted Solution

by:
ajarvey earned 2000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

765 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