Solved

How to get rid of spaces between commans in csv file

Posted on 2010-08-16
6
377 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

747 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

13 Experts available now in Live!

Get 1:1 Help Now