@Gorgious
Thank you very much for the code review, much appreciated!
In Python there is not need to test if var == True: since if var: is automatically evaluated to True or False depending on the value of var (in most situations at least). Similarly an empty list returns False when boolean tested : if len(my_list) == 0: is the same as if not my_list:.
Changed it everywhere in the scripts from ==
to is
where applicable.
You're generating all the data lists regardless of what the user selected or unselected before exporting. You may optimise the script by only fetching the data when you test if each individual data headers have been selected.
This is a very good point and I didn't think of this. I now have put an if statement for each check so it doesn't construct the entire pandas dataframe. Though not very elegant but effective and easy readable
You have some rogue lines of codes here :
Removed the lines of code
Still need to implement the other suggestions.
@duncan
It would be great if you used the Open Document Format
I didn't know that, thanks for the heads up. To be honest, I never bothered to open a .xlsx file with notepad++. I always made the assumption they were .xml files.... it's not open source indeed and the name of the application is now misleading and wrong at the moment.
I looked into creating a .ods file
I found with pandas you can do the following:
writer = pd.ExcelWriter(excel_file, engine='odf')
But the whole code relies heavily on xlsxwriter. So that might be some work before I am able to create .ods files. I found this Python module to create .ods files. But it's very light and I can't find a method to make a table or a filter. Which is quite essential to the add-on.