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

worksheet.print_area does not accept a column only range like "A:H" #139

Closed
JeremyAllenNZ opened this Issue Jul 10, 2014 · 2 comments

Comments

2 participants
@JeremyAllenNZ

JeremyAllenNZ commented Jul 10, 2014

The documentation for worksheet.print_area has an error in the example:

worksheet3.print_area('A:H') # Columns A to H if rows have data.

Attempting to use this form results in:

File "D:\projects\XlsxWriter\xlsxwriter\utility.py", line 108, in xl_cell_to_rowcol
col_str = match.group(2)
AttributeError: 'NoneType' object has no attribute 'group'

since utility.range_parts requires a digit after the letter

Excel does allow a print range like 'A:H' and worksheet._convert_name_area will generate one like that when print_area is called with:

worksheet.print_area(0,0,worksheet.xls_rowmax-1,7)

Thank you for the great library

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jul 11, 2014

Owner

Hi Jeremy,

Thanks for that. The documentation is incorrect in this case. A column-only range like A:H will not work.

As you spotted, those types of ranges are supported but via an explicit (albeit cumbersome) max range like A1:H1048576.

I'll update the docs to outline that.

Regards,

John

Owner

jmcnamara commented Jul 11, 2014

Hi Jeremy,

Thanks for that. The documentation is incorrect in this case. A column-only range like A:H will not work.

As you spotted, those types of ranges are supported but via an explicit (albeit cumbersome) max range like A1:H1048576.

I'll update the docs to outline that.

Regards,

John

@jmcnamara jmcnamara added bug labels Jul 11, 2014

@jmcnamara jmcnamara self-assigned this Jul 11, 2014

jmcnamara added a commit that referenced this issue Jul 21, 2014

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jul 22, 2014

Owner

Fixed in version 0.5.6. Thanks.

John

Owner

jmcnamara commented Jul 22, 2014

Fixed in version 0.5.6. Thanks.

John

@jmcnamara jmcnamara closed this Jul 22, 2014

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