question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excel : unable to work with ranges over sheets with name containing either '.' or '-'

See original GitHub issue

Hi,

I’m currently working with a O365 Excel worksheet containing around 60 sheets. There is a semantic on the sheets names and I may not change them. I need to retrieve some cell ranges over these sheets. If the sheet name contains only letters or figures, its ok, the following code works:

name = "Sheet1" ws = excel_file.get_worksheet(name) cell1 = ws.get_cell(1, 0) cell2 = ws.get_cell(1, 10) range_name = "{}:{}".format(cell1.address, cell2.address) cellrange = ws.get_range(range_name)

However, if I set name = "1.1" or name = "1 - stuff" I’ve got the following error: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: [...] Error Message: Syntax error at position 20 in 'address=

Any ideas ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KorriGnucommented, Dec 2, 2020

It seems to work now

Thank you

0reactions
janscascommented, Dec 2, 2020

can you try now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I seeing the Name Conflict dialog box in Excel?
Excel will copy the conflicting name range to the destination workbook. That means you will have two similarly named ranges in your destination...
Read more >
Excel named range - how to define and use names in Excel
The tutorial explains what Excel name is and how to define a name for a cell, range, constant or formula. You will also...
Read more >
Name a range of cells - Computer - Google Docs Editors ...
You can name ranges in Google Sheets to keep better track of them and create cleaner formulas. ... Can't contain any spaces or...
Read more >
Excel Named Ranges Explained
This means when you're in Sheet 1 you will NOT see the Named Range 'Jobs' in the Name Box or be able to...
Read more >
An Easy Guide to the Google Sheets Named Range Function
It can't have any punctuation or spaces. You can use an underscore instead of a space. For example, write “net_worth” instead of “net...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found