Showing posts with label xlsxwriter. Show all posts
Showing posts with label xlsxwriter. Show all posts

Sunday, April 19, 2020

Learn Thou xargs John McNamara!

What he tells you to do :

$ unzip myfile.xlsm -d myfile
$ xmllint --format `find myfile -name "*.xml" | xargs` | grep "Pr.*codeName
"


(that's cool that you can specify the output dir with -d)

What you're better off doing :

$ find myfile -name '*.xml' | xargs xmllint --format | grep 'Pr.*codeName'

works!

Tuesday, April 17, 2018

Pandas and XlsxWriter

Can you add an Excel table using a pandas dataframe to an existing worksheet?

No. What you can do is use pandas.dataframe.to_excel to create the sheet with the dataframe inserted to start from a certain row, and then you can use

pandas.ExcelWriter to capture the book and sheet and then use

sheet.write to insert values..