Attached with this post are three files:
1. diff_tool.py: Python file, which uses difflib to find difference between two text files.
2. my_shopping_list.txt: Text file 1
3. friends_shopping_list.txt: Text file 2
4. diff.html: HTML file, which is the output that lists the differences.
If all files are kept in same folder, here's the command that executes the script:
Now my requirement is that I want the output to be in excel. When I open the HTML file in excel, it translates to table very beautifully, but all highlights are gone.
So I want to find a way to retain that formatting. If I can convert the HTML file into Excel file right from within python, that would be the dream!
1. diff_tool.py: Python file, which uses difflib to find difference between two text files.
2. my_shopping_list.txt: Text file 1
3. friends_shopping_list.txt: Text file 2
4. diff.html: HTML file, which is the output that lists the differences.
If all files are kept in same folder, here's the command that executes the script:
Bash:
python diff_tool.py my_shopping_list.txt friends_shopping_list.txt --html diff.html
Now my requirement is that I want the output to be in excel. When I open the HTML file in excel, it translates to table very beautifully, but all highlights are gone.
So I want to find a way to retain that formatting. If I can convert the HTML file into Excel file right from within python, that would be the dream!