removing gridlines from excel using python -


i'm trying remove gridlines excel worksheet created using openpyxl, , it's not working. i'm doing this:

wb = workbook()    ws = wb.get_active_sheet() ws.show_gridlines = false print ws.show_gridlines wb.save('file.xlsx') 

the code prints 'false', yet saved file shows gridlines.

there relevant issue in openpyxl issue tracker. plus, according source code show_gridlines worksheet class property has no affect @ all. watch issue update on it.

as alternative solution, try new , awesome xlsxwriter module. has ability hide grid lines on worksheet (see docs). here's example:

from xlsxwriter.workbook import workbook  workbook = workbook('hello_world.xlsx') worksheet = workbook.add_worksheet()  worksheet.write('a1', 'hello world') worksheet.hide_gridlines(2)  workbook.close() 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -