Software

Ask Software Development Questions and Get Answers ASAp

Ask a Computer Expert,
Get an Answer ASAP!

Software

I'm wondering if there is a way to remove the extra commas

Customer Question
at the end of a...
I'm wondering if there is a way to remove the extra commas at the end of a csv export from Google Sheets?
Details:
I have a spreadsheet where the rows have a varying number of fields. When I save the spreadsheet as a .csv it pads the shorter fields with extra commas. Any way to remove these. Basically, I just can't have a row end in a comma.
Spreadsheet looks like this:
RED ORANGE
YELLOW GREEN BLUE PURPLE BROWN
WHITE
downloading as .csv gives this:
RED,ORANGE,,,
YELLOW,GREEN,BLUE,PURPLE,BROWN
WHITE,,,,
I need to trim the trailing commas off of the .csv file before it gets saved. Any ideas?
Submitted: 1 year ago.Category: Software
Show More
Show Less
Ask Your Own Software Question
Answered in 10 minutes by:
4/6/2016
Software technician: Dustin, Computer Support Specialist replied 1 year ago
Dustin
Dustin, Computer Support Specialist
Category: Software
Satisfied Customers: 13,543
Experience: I have vast experience with configuring & repairing and utilizing software.Also worked in The US Army as A Network Switching Systems Operator/Controller
Verified
Welcome to Justanswer.com, my name is ***** ***** I will do my best to assist you. Before you export, you may have this showing in the formula fields for some of your columns. &"," That would show up at the end of the formula, and all that sybmol does is add a comma. If you see those in your spreadsheet before exporting.. We may need to clear those up and remove them. They should only appear at the end of the formulas so removing them shouldnt affect anything. If you see them, I would test by removing the &"," symbol from one column /formula, export.. See if that fixed the issue for that column, and if so then we can repeat the fix on other columns. If this doesnt help or doesnt fix the issue, let me know and maybe I can look at the sheet and try to figure out what the issue is. I strive to provide great service, and greatly appreciate a rating of excellent ( 5 stars ) selected and submitted below this answer or at the top right of the screen. I always answer follow up questions.Dustin S.Senior Technician and Network Switching Systems Operator / Maintainer.
Ask Your Own Software Question
Customer reply replied 1 year ago
No, there is nothing like that on the sheet. I think it requires a Google Apps script that saves to csv and then strips off the commas.
Software technician: Dustin, Computer Support Specialist replied 1 year ago
To be clear, from the google sheets page your choosing file > download as > csv ? Or are you choosing another download setting?
Ask Your Own Software Question
Customer reply replied 1 year ago
You're correct, I'm going to File, Download as csv. It seems when downloading as .csv it wants to pad all the rows with empty fields so they all contain the same number of fields. I need it to not do that, and not have a comma at the end of the last (populated) field, but still contain commas between the fields (obviously). Thanks
Software technician: Dustin, Computer Support Specialist replied 1 year ago
How about if we download as excel instead? Or open office format. ( if you don't have excel ) We could then export from excel as csv or open office, and it may not add the commas. What I can say is that this isn't normal behavior, something is causing that sheet to export with the added commas.
Ask Your Own Software Question
Customer reply replied 1 year ago
Excel will do the same thing actually. And if I'm going to have to save it as Excel, then open it again in excel, I might as well create it in Excel in the first place (which isn't what I want to do).
Software technician: Dustin, Computer Support Specialist replied 1 year ago
Understood. Would it be possible for you to share or make the sheet public and provide a link so I can have a look at it and try to figure out whats causing the issue?
Ask Your Own Software Question
Customer reply replied 1 year ago
https://docs.google.com/spreadsheets/d/1TGwhbdAKQZiwQz5INoEytDRGTC3UgKYpNpWr8gdNWSY/edit?usp=sharing
Software technician: Dustin, Computer Support Specialist replied 1 year ago
Ive not been able to repeat the problem. When I download as csv, and then open the file ( using excel or open office ) I dont see the commas showing. ( the only change I did was choose format, clear formatting) If you can get the commas to occur again, please tell me how you did so. Such as , download, save as csv. Then opened with " program"
Ask Your Own Software Question
Customer reply replied 1 year ago
Try opening with a text editor like notepad++, TextPad, etc. . I need it to stay in a .csv format for FTP'ing. I'm not trying to import it back into Excel.
Software technician: Dustin, Computer Support Specialist replied 1 year ago
Understood. Those commas will show in basic text editors, each comma represents a cell with blank data. Or rather, the space in between commas represents a cell with blank data. If you take the csv file and open in ( not import, just open ) excel or open office or any other spreadsheet app, those commas disappear and wont show. But when you open it with a text edit program, it has to show the commas or else it has no way to represent an empty cell. For instance, if you put the number zero beneath brown we see this when we open it with notepad ++ BLUE,RED,,,ORANGE,YELLOW,BLACK,BROWN,WHITEPURPLE,,,0, Showing us that the zero is the third cell after purple.. Short version. There is no way to remove the commas when you export as csv, or else it would no longer function as a "comma separated values" formatted file.. If you remove the commas then you only have a text file with no way for other programs to recognize what data goes in what cells.. If you have further questions or concerns, let me know~ I strive to provide great service, and greatly appreciate a rating of excellent ( 5 stars ) selected and submitted below this answer or at the top right of the screen. I always answer follow up questions.Dustin S.Senior Technician and Network Switching Systems Operator / Maintainer.
Ask Your Own Software Question
Customer reply replied 1 year ago
I'm not asking to remove all the commas, just the trailing ones so a row never ends with a comma. It's adding a bunch of empty fields to the shorter rows, and that's throwing the program off that I need to load this into. I just need the number of fields in the csv to represent the number of populated fields on the spreadsheet. I don't think you understand the business case. Is there anyone else that might know Google Sheets or scripting, otherwise I'll just ask for a refund.
Software technician: Dustin, Computer Support Specialist replied 1 year ago
I understand how the function works. Ive explained how the function works. This has always been the case with google sheets and many other spreadsheet programs. If you dont want commas, export in tsv instead of csv Other wise, your going to have to convert with powershell or use a different spreadsheet program that will do what you want.
Ask Your Own Software Question
Ask Dustin Your Own Question
Dustin
Dustin
Dustin, Computer Support Specialist
Category: Software
Satisfied Customers: 13,543
13,543 Satisfied Customers
Experience: I have vast experience with configuring & repairing and utilizing software.Also worked in The US Army as A Network Switching Systems Operator/Controller

Dustin is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

Jess M.

Jess M.

Computer Support Specialist

658 satisfied customers

Computer Software Support specialist for more that 10 years

Chris L.

Chris L.

Support Specialist

500 satisfied customers

Certified Software expert with over 10 years experience.

IT Miro

IT Miro

Computer Scientist

497 satisfied customers

Bachelor's Degree in Information Technology, Microsoft Certified Professional

Jins M. N.

Jins M. N.

Computer Hardware Engineer

460 satisfied customers

12+ years experience. Expert in installing and problem fixing of softwares.

Kamil Anwar

Kamil Anwar

Software Specialist

447 satisfied customers

8+ Years of Experience. / CCNA (S), CCNA (W), CCNA (RS), MCTS, MBCs.

Steve Herrod

Steve Herrod

Computer Support Specialist

220 satisfied customers

Familiar with a wide variety of software and experienced in user training/support

Byron

Byron

Computer Support Specialist

160 satisfied customers

12 years in operations at a large law firm supporting both retail and specialty applications.

< Previous | Next >

Related Software Questions
I just renewed my virus protection. It did not ask me for
I just renewed my virus protection. It did not ask me for any money. I probably have a credit card associated with my account but I cannot remember which one it is, Also I do not remember my login and… read more
Richard
Richard
IT Manager
IT Manager, Consultant
3,208 satisfied customers
My one drive is over the storage limit and will be frozen
my one drive is over the storage limit and will be frozen 1-21-18. what do I need to do. … read more
Josh
Josh
It Support Specialist
Associate Degree
5,127 satisfied customers
Live photo gallery in w7 has an error message and won't come
Live photo gallery in w7 has an error message and won't come up. Can't download photos … read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
658 satisfied customers
When I play Microsoft Solitaire Collection, my computer
When I play Microsoft Solitaire Collection, my computer keeps 'beeping'. … read more
Specialist Sean S.
Specialist Sean S.
Computer Support Technician
676 satisfied customers
Grub rescue> appears when I try to boot and it can't find
grub rescue> appears when I try to boot and it can't find the partition because I was stupid and deleted it. is there an ISO for windows or linux that will bypass the grub? … read more
caraleneK
caraleneK
Service Manager
1,638 satisfied customers
When I try to convert an Ecel file to PDF it says 'missing
when I try to convert an Ecel file to PDF it says 'missing PDF files'. i used to do it all the time and have Adob ACROPro … read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
658 satisfied customers
I have a surface computer. I just clicked on the people tile
I have a surface computer. I just clicked on the people tile to look up a phone number and all my numbers are gone. When I click on it , it tells me to "get started" by... I've had surfaces for over 4… read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
658 satisfied customers
I have a laptop want see sling tv they told need microsoft
hi i have a laptop want see sling tv they told need microsoft 10 free where should go … read more
Specialist Sean S.
Specialist Sean S.
Computer Support Technician
676 satisfied customers
Can not log in to skype. But it has the wrong email address
yes but it has the wrong email address amd wrong phone number … read more
Richard
Richard
IT Manager
IT Manager, Consultant
3,208 satisfied customers
How to get the plug-in ,Photomerge-----in Elements
How to get the plug-in ,Photomerge-----in Elements 14---thank you … read more
David L.
David L.
Bachelor\u0027s Degree
6 satisfied customers
How can I get my original authorization code reset? I still
How can I get my original authorization code reset? I still have my authorization code for my SPSS 23 purchased on 3/3/2015. Can someone help me with resetting the authorization code so that I can use… read more
caraleneK
caraleneK
Service Manager
1,638 satisfied customers
I have an ch341a that only uses bin files, asus uses cap. is
I have an ch341a that only uses bin files, asus uses cap. is there any to convert the cap file so i can use the ch341a to program a chip … read more
caraleneK
caraleneK
Service Manager
1,638 satisfied customers
Expert I have written 3 lines of melodies (in form of
Dear Music ExpertI have written 3 lines of melodies (in form of events)How Can I make a harmony on these 3 lines ? I would like to compose the song on A harmonic minor.Is there a software, website or … read more
caraleneK
caraleneK
Service Manager
1,638 satisfied customers
I cant get my stock charts on tdameritrade trade architect
I cant get my stock charts on tdameritrade trade architect since downloading the new firefox … read more
Kris R
Kris R
IT Manager
Computing
2,263 satisfied customers
I would like to have a program that would allow me to change
I would like to have a program that would allow me to change fonts on a document that I have downloaded or scanned … read more
Jess M.
Jess M.
Computer Support Specialist
Bachelor's Degree
658 satisfied customers
Im running problems in sharepointand infopath. Hp laptop.
hi im running problems in sharepointand infopath JA: What kind of computer do you have? Customer: hp laptop JA: Have you installed any updates recently? Customer: not really JA: Anything else you want… read more
David L.
David L.
Bachelor\u0027s Degree
6 satisfied customers
How do I find my address book? At the moment all I can fin
how do I find my address book? At the moment all I can fin are the telephone numbers … read more
Josh
Josh
It Support Specialist
Associate Degree
5,127 satisfied customers
I believe I may have a corrupted .ost file - as I no longer
I believe I may have a corrupted .ost file - as I no longer can access MS outlook … read more
The-PC-Guy
The-PC-Guy
Bachelor\u0027s Degree
628 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x