Reputation: 342
I have a cell with a multiline value. For example:
Testing line 1
Testing line 2
When I copy it and paste it at any text editor, there are quotation mark at the front and at the end of the value. That is
"Testing line 1
Testing line 2"
How can I get rid of it?
Upvotes: 1
Views: 1796
Reputation: 66
To generate an text file from a sheet, download the sheet as TSV, but use File Extension ".txt" (or whatever extension you need.)
E.g. to generate an HTML file from a sheet, download the sheet as TSV, but use File Extension ".html"
Output works well for HTML, but may be a bit "tabby" for plain text output.
Upvotes: 0
Reputation: 13
This is a messy workaround... but if you set the sheet up so that the cells you plan to copy out are filled by something like a SPLIT function, all the cells in the SPLIT results besides the one that holds the formula will read as raw text. This would allow you to enter the cell and "select all" before copying, giving you the values without the quotes present.
This is not a good fix, as it saves little time compared to deleting the quote marks manually. But its the best I've been able to find for my own purposes.
Upvotes: 0
Reputation: 1
When you copy multiline data from Google Sheets possibly containing CHAR(10)
, it may include extraneous double quotes as well as unnecessary beginning and ending single quotes.
Add the following sanitize
command to your ~/.zshrc
file:
sanitize() { echo "$1" | sed 's/""/"/g' | sed 's/^"//' | sed 's/"$//' | pbcopy; }
Use the command sanitize '<STRING>'
after copying multiline data from Google Sheets. Replace <STRING>
with the data you've copied.
By following these steps, your automatically copied string will be formatted as desired.
Upvotes: 0
Reputation: 2486
This is an expected behavior. The quotation marks are necessary to distinguish the groupings of the data with respect to each cell. In the example below, "TEST and TEST2" are separated from that of "TEST3 and TEST4" (with the use of quotation marks) since both pairs belong to different cells.
To remove the quotation marks, i recommend the following workarounds:
Upvotes: 0