Delete row/column from Excel with xlsxwriter
Asked Answered
P

3

9

Is it possible?

I know ws.set_row('B:B', options={'hidden': True})

But, is there something like ws.set_row('B:B', options={'delete_row': True})?

Pyuria answered 24/10, 2019 at 12:34 Comment(0)
M
4

It doesn't seem possible to do what you ask. Probably the best approach remains the one proposed in this old post.

Mistakable answered 24/10, 2019 at 13:14 Comment(0)
V
3

To quote the Worksheet docs:

"""
The options parameter is a dictionary with the following possible keys:

'hidden'
'level'
'collapsed'
""""

Other values like delete_row are not acceptable.

Val answered 24/10, 2019 at 12:41 Comment(0)
C
0

You cannot delete a column with XlsxWriter. The best option is to structure your application so it doesn't write data to the column in the first place.

Claudioclaudius answered 24/10, 2019 at 15:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.