PydPiper / pylightxl

A light weight, zero dependency, minimal functionality excel read/writer python library
https://pylightxl.readthedocs.io
MIT License
302 stars 47 forks source link

Pylightxl In the help document, missing: #93

Open swordsman-catS opened 1 year ago

swordsman-catS commented 1 year ago

Pylightxl Version:I don't know Python Version:3.10

Summary of Bug/Feature:Missing a ':'

Traceback:

Suggestion for fix: Cuando leí la Guía de inicio rápido de pylightxl, descubrí que en el capítulo (2.6. Escribir un nuevo archivo de Excel a partir de los datos de python) al bucle for le falta un ":"

El código original es:

import pylightxl as xl

# take this list for example as our input data that we want to put in column A
mydata = [10,20,30,40]

# create a blank db
db = xl.Database()

# add a blank worksheet to the db
db.add_ws(ws="Sheet1")

# loop to add our data to the worksheet
for row_id, data in enumerate(mydata, start=1)
    db.ws(ws="Sheet1").update_index(row=row_id, col=1, val=data)

# write out the db
xl.writexl(db=db, fn="output.xlsx")

Falta un ":" en el bucle for It should be:

for row_id, data in enumerate(mydata, start=1):
    db.ws(ws="Sheet1").update_index(row=row_id, col=1, val=data)