xlsxwriter readlines() feature

Asked 2 years ago, Updated 2 years ago, 45 views

Does python xlsxwriter have a method that has the same function as Python's readlines()? I want to create a function in Excel that tries to erase a row if a particular cell in that row does not have a value.

xlsxwriter python excel

2022-09-21 20:01

1 Answers

The xlswriter module focuses on the ability to generate Excel, as the name suggests.

We recommend the https://openpyxl.readthedocs.io/en/stable/index.html module.

from openpyxl import load_workbook
wb = load_workbook(filename='file.xlsx')
ws = wb['one']

for row in ws.rows:
    for cell in row:
        print(cell.value)


2022-09-21 20:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.