Skip to content

Copying cells containing double quote adds more double quotes #899

@sfc-gh-jipark

Description

@sfc-gh-jipark
Contributor

When copying Text cell whose data includes a double quote, text copied gets escaped with two more double quotes.

Note that this happens only when copying into TextBuffer and when copying cell, not text in the textarea in edit mode

What is the rationale for escaping here? Can customize this behavior to respect raw value? Explicitly providing copyData doesn't seem to help

https://glideapps.github.io/glide-data-grid/?path=/story/glide-data-grid-dataeditor-demos--copy-support
screencast-newtab-2024.02.08-12_51_47.webm

Activity

jassmith

jassmith commented on Feb 14, 2024

@jassmith
Contributor

The general rationale here is to make the copy/paste fully compatible (as much as possible) with excel, excel online, google sheets, and apple numbers. The copy buffer contents are both simultaneously well standardized between the different spreadsheets and a total shitshow.

Apple Numbers puts in useless extra newlines, Google Sheets generally is sane, and Excel... oh god... Whatever the fuck those insane people were thinking is beyond me. "Oh hey lets make copy and paste a fucking online service... sounds good!"

That said... yeah I could probably escape less aggressively. I think escaping due to the quotes is technically only needed when the cell contains a newline or a tab character.

bazooka-tango

bazooka-tango commented on Mar 20, 2024

@bazooka-tango

How do we turn this off?! No company in my industry copies-and-pastes between Excel and Google Sheet, and any casual user would absolutely intend for copy and paste to actually copy and paste the contents of the cells without modifying them.

This has completely broken every single Google Sheet in my company, we are in dire need of a complete reversion or fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package:coreRequests related to the core package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @jassmith@lukasmasuch@sfc-gh-jipark@bazooka-tango

      Issue actions

        Copying cells containing double quote adds more double quotes · Issue #899 · glideapps/glide-data-grid