PydPiper / pylightxl

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

Read comment from cell #41

Closed redsigma closed 3 years ago

redsigma commented 3 years ago

Pylightxl Version: 1.54 Python Version: 3.5.3

Summary of Bug/Feature: Is it possible to get the comment of each cell or maybe for the first cells in the first row ?

PydPiper commented 3 years ago

Hi Redsigma, thanks for considering using pylightxl. This new feature shouldnt be too hard to add. I can take a look at it this week

PydPiper commented 3 years ago

Hey @redsigma please check out the latest master branch. I've added comments parsing. I am working on another feature at the same time so the new version to pypi will not go out till most likely this weekend, but for now you can pip install git+https://github.com/PydPiper/pylightxl.git and use it.

for example

import pylightxl
wb = pylightxl.readxl('test.xlsx')
wb.ws('Sheet 1').index(1,1,output='c')

note that all indexing methods got updated with a new argument output that is v for value, f for formula and c for comment.

Thanks for using pylightxl! :)