Hacker News new | past | comments | ask | show | jobs | submit login

Would you mind explaining in more detail what your custom library enabled?



It's been long enough that my memories are fuzzy.

I do remember defining a specific format for a cover page: merging a large block of cells and customizing the font information within. I suspect I had other formatting convenience functions to make the reports more consistent.

I created a single data structure to wrap the workbook and worksheet objects and include a "current" row/cell tracker, so that I could invoke an "add row" function to write the next row in the sheet without indicating where in the worksheet the data should be added.

Each write function would then take as arguments the data structure and a string label to indicate which worksheet I wanted (numeric indexing was also an option, but I found strings to be the best way to make the code obvious about what worksheet we were actively modifying).

I also did some work with tagged data (via tuples) so my library could choose which write function to invoke in xlsxwriter. I don't remember the motivation for that.


Super helpful, thank you for taking the time to share this, I appreciate it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: