Solved

How to get rid of spaces between commans in csv file

Posted on 2010-08-16
6
379 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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.

773 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