-
Notifications
You must be signed in to change notification settings - Fork 6
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
Can't Determine Cell Limits from A1 String Only Having Columns or Rows #26
Comments
I had no idea! How does Excel know if this means rows or columns? Is this documented somewhere as an officially supported form of cell reference (whatever that means 🙄)? cellranger does support such ranges already inside |
It's supported by Excel and Google Sheets and defaults to this notation as soon as you select the entire row or column as part of a formula. Here is some Sheets documentation on valid A1 notations: https://developers.google.com/sheets/api/guides/concepts#a1_notation |
I need this myself ASAP, so am working on it. |
@StevenMMortimer In case you still have a special interest in this, do you know or are you willing to research whether Excel supports all of these: https://developers.google.com/sheets/api/guides/concepts#a1_notation
I think the first two are "no brainer" yes's. But it's that last one that seems unfamiliar to me. Plus it brings up several variations on the same theme that ... might work? No pressure, but I'm just putting out a feeler in case you are interested in this. |
Sorry to butt in but I also have a special interest in this! Excel interprets the second If you use the formula |
Below is the list of supported A1 Notations from the Google Sheets documentation. I've crossed out the ones that don't work in Excel.
With the fourth bullet, Excel commits you to providing both the row and column for each endpoint of the range or neither endpoints of the range. For example, With the sixth bullet, I assume Excel is trying to protect you from inadvertently operating over some non-numeric or unexpected values by not letting you specify the entire sheet. Or it's some protection against the computing power used when running against an entire sheet. You know how Excel is always trying to anticipate what you want to do before you do it ;) |
This is coming from the Sheets API docs (vs browser UI), so I think it's saying that ... if you ask for cells A1:B2 without specifying the sheet, it defaults to the first visible sheet.
I think this is another case that's pretty unique to an API request (vs. normal UI). If you send that as the range for reading a Google Sheet, you get all cells on that sheet. |
So it's really stuff of this form: |
as.cell_limits()
will correctly parse an A1 formatted string that has the column letter and row number; however, it fails on instances that only specify the columns or rows such asAfrica!A:B
orAfrica!2:3
.Given that
Africa!A:B
orAfrica!2:3
are common shorthands it would be good to support their parsing. I was able to get things working by updating the following regex statements in a way that relaxes the assumption that there is at least 1 letter and 1 number in the string. That seemed reasonable, but maybe I'm missing something.The text was updated successfully, but these errors were encountered: