24

Every time I copy and paste from a Google Spreadsheet, it adds a double quote before and after everything, and duplicates every single double quote.

For example, if I copy:

This is a "string" of sorts.

And paste ANYWHERE else (I can reproduce it on Windows, Mac, Linux, Notepad++, SublimeText, Xcode...) it results into:

"This is a ""string"" of sorts."

How can I copy and paste so that A" results in A" instead of "A""?

EDIT: I am talking about when you copy an entire cell, if you enter edit mode in a cell and copy the contents, the copy works fine. But you cannot copy formula-based cells this way, or multiple cells.

  • I can't reproduce your results. I've taken the exact string in Google Spreadsheets and copied it to an Outlook mail (native), notepad (Window 7), all yielding the same string !! I used Crtl+C and the way to copy from within the spreadsheet. – Jacob Jan Tuinstra Mar 12 '13 at 12:06
  • If you click the cell first and copy the contents of the cell (not the cell itself) it will work. I am having this issue specially with concatenated strings (because there are no contents to copy beside the formula). – speeder Mar 12 '13 at 13:37
  • 1
    I can’t reproduce your results either. Even after you edited it. – Alex Mar 14 '13 at 17:16
  • 3
    I have this problem as well, it seems to happen whenever I insert a line-break. The output looks fine in the doc but the extra quotes show up when pasting. This formula should reproduce the problem: ="This is a ""string"" and "&CHAR(10)&" a linebreak" – Ben Collier Jun 13 '13 at 16:30
  • 2
    @BenCollier with linbreak this is by design, because otherwise it cannot know if it's break to next row or linebreak within cell (currently you can copy & paste any cells, even if they contain linebreaks). Alex, can you confirm there is no linebreaks in the cells you copying? – LogicDaemon Jan 11 '14 at 22:16

10 Answers 10

21

I found a workaround for this:

Just replace all "\n" symbols (LF - Line feed or 0x0A in ASCII) that's represented by CHAR(10) in Formulas by "\r" symbols (CR - Carriage return or 0x0D in ASCII) that's represented by CHAR(13).

And when you copy and paste as plain text it will be without added quotes in it.

Here is formula to do it:

=SUBSTITUTE(A1,CHAR(10),CHAR(13))
| improve this answer | |
  • Thank you for the solution. It was painful to do post processing. You are awesome. – mslugx Oct 21 at 8:57
  • Unfortunately, this removed all my line breaks. – Phil Anderson Oct 27 at 12:47
6

This is most likely due to new lines or tab characters in your data. If so, you can wrap your formula or the cell you need as shown, in clean, for example: =clean(A1).

From the docs, clean does this:

Returns the text with the non-printable ASCII characters removed.

| improve this answer | |
  • 1
    Underrated answer! Thanks :) – Jo-el Sep 11 at 0:11
3

The "issue" is that Google Spreadsheet is putting valid CSV-formatted data into the clipboard.

The workaround is to publish the spreadsheet to the web (File -> Publish to Web) and copy out of that document instead.

It's not much of a solution but it can save you some time.

| improve this answer | |
  • Note: this is identical to Geoff Gerrietts' answer in Google Products forum – user135384 Jan 24 '17 at 21:35
1

What just worked for me, after having tried copying a cell that was generated by a formula (with line breaks and some single quotes) and didn't work correctly pasting to NotePad and NotePad++, was copying to a Google Doc (or to Microsoft Word, but why do that instead?).

Google Doc and Word both displayed the wanted result.

Select what you want to copy from Google Sheets, Control-C to copy (or use the menu), make a new or open an existing Google Doc (or Microsoft Word), Control-V to paste, or use the menu.

| improve this answer | |
  • 1
    Not very clear. – serenesat Jul 7 '16 at 15:07
  • Select what you want to copy from Google Sheets, Control-C to copy (or use the menu), make a new or open an existing Google Doc (or Microsoft Word), Control-V to paste, or use the menu. – roirraW 'edor' ehT Jul 8 '16 at 16:49
  • When copying a spreadsheet into Google Docs, it pastes as a table. You can then copy the data again from Google Docs, and this time it won't do the quoting. – sffc Oct 17 '17 at 2:51
1

My approach in this situation is to copy formula-generated cells (Ctrl-C) and values-paste them elsewhere on the sheet (Ctrl-Shift-V). The new cells are no longer formula-generated, so the approach described in the question works, in either of two forms:

  1. Double-click, select all, copy

or

  1. Click the formula bar, select all, copy

Either 1 or 2 requires copying one cell at a time; but for one or a few cells this is not too bad.

| improve this answer | |
1

The function you're looking for is T() which returns string arguments as text. This should effectively treat the contents as if they were not calculated when you copy and paste. Some people have suggested using CHAR(13) instead of CHAR(10) but that won't show newlines in some environments, so I like this approach.

=T(SUBSTITUTE("This\nis\nsome\ntext.", "\n", CHAR(10)))

I hope it works for you.

| improve this answer | |
0

Try pasting without formatting: Ctrl+Shift+V (or Command+Shift+V).

| improve this answer | |
  • 1
    I tried here on a OSX (command+shift+v) copying to sublime text, did not worked. – speeder Dec 9 '13 at 18:44
0

You can use combination of multiple answers which are here.

Lets say that you have your data in cells A1:A10 computed from formula.

Here are steps to copy them out:

  • select cells A1:A10 and copy the content by ctrl + c
  • click on B1 and press ctrl + shift + v or right click and select Past values only
  • then click on B11 and to that cell enter formula =concatenate(B1:B10) this will "merge" the cells into one
  • click on cell B11 and copy the content by ctrl + c
  • click on C11 and press ctrl + shift + v or right click and select Past values only
  • and finally double click on C11 and copy the content out to your file

Warning: I tested this only on string generated data by formula. If the output of your formula are numbers, I am not sure if this will work... Also for large datasets this may not work... but for me it worked with 100+ rows..

Also the concatenate function will merge the data so the result is one big chunk of text. You may need to insert on the end of each row some "token" which you will then replace with new line...

| improve this answer | |
-1

This annoys me too.

If you just select the cell to copy from, Gdocs will add the double quotes around your pasted content.

However, if you double click into the cell like you are going to edit the contents, select and copy it from that view, when you paste it, it will not add the quotes. Adds an extra click, but is still easier than exporting it.

| improve this answer | |
  • 1
    Agreed but sadly, if the cell contains generated data (say, from a formula) then you just end up getting the formula :( – RedYeti Feb 5 '15 at 14:00
  • 3
    This was writtein in my original question... People read before replying? – speeder Feb 10 '15 at 15:00
  • If you first copy and paste as value and then do this, it works. None of the other methods listed here worked for me, but paste as value + double click into cell to copy did. – Vincent Nov 29 at 18:22
-1

Got the solution right here.... (see example sheets file in this link)

To sum it up: If you can live without linebreaks in the text you are generating within a cell, then you will be able to paste without quotations. the line-breaking can then be done in the destination file.

Exhaustive example in the link above.

| improve this answer | |
  • 3
    Always include essential part of the link into answer. – serenesat Jan 31 '16 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.