Myrick Chow
Myrick Chow

Reputation: 342

How to copy the multiline value of a cell without quotation mark?

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

Answers (4)

M. Hoffman
M. Hoffman

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

Jacob Harris
Jacob Harris

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

Boogie Cigdemoglu
Boogie Cigdemoglu

Reputation: 1

Instructions for Sanitizing Multiline Data from Google Sheets

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.

Solution:

  1. Add the following sanitize command to your ~/.zshrc file:

    sanitize() { echo "$1" | sed 's/""/"/g' | sed 's/^"//' | sed 's/"$//' | pbcopy; }
    
  2. 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

PatrickdC
PatrickdC

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.

replication

To remove the quotation marks, i recommend the following workarounds:

  1. Manually copy the data from within the individual cells by double clicking the cell.

solution1

  1. The other method would be to copy the cells as is and then hit search and replace the quotation marks with blanks.

Upvotes: 0

Related Questions