Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as.range() should be able to surround sheet name with single quotes #31

Open
jennybc opened this issue Mar 31, 2018 · 4 comments
Open
Milestone

Comments

@jennybc
Copy link
Member

jennybc commented Mar 31, 2018

It is possible this should be the default, in fact.

From Google Sheets v4 API:

https://developers.google.com/sheets/api/guides/concepts#a1_notation

If the sheet name has spaces or starts with a bracket, surround the sheet name with single quotes ('), e.g 'Sheet One'!A1:B2. For simplicity, it is safe to always surround the sheet name with single quotes.

@jennybc
Copy link
Member Author

jennybc commented Mar 31, 2018

I welcome comments from the Excel side of the house. And will add them myself next time my head is in that place.

@jennybc jennybc added this to the v1.2.0 milestone Apr 3, 2018
@jennybc
Copy link
Member Author

jennybc commented Apr 4, 2018

@nacnudus @StevenMMortimer

Do you have any thoughts about this? Can we think of any reason to NOT produce single-quote protected sheet names when cellranger makes a ref string?

@StevenMMortimer
Copy link

I think single quotes should be the default. Not just spaces, but any sheet name resembling R1C1 or A1 notation will also cause Excel to surround the name in quotes. See the following example on SO: https://stackoverflow.com/a/41680637/5258043

@nacnudus
Copy link
Contributor

nacnudus commented Apr 4, 2018

I think it's a reasonable default. The linked API doc doesn't mention that single quotes in the sheet name are escaped by doubling, so if there's a function to extract the sheet name from a ref, it will have to de-escape them. E.g. ='Jenny''s Sheet'!A1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants