vallettea / koala

Transpose your Excel calculations into python for better performances and scaling.
GNU General Public License v3.0
144 stars 59 forks source link

Using Koala to reduce the unnecessary sheets of excel file #254

Open haowang0402 opened 4 years ago

haowang0402 commented 4 years ago

Dear authors of Koala,

I really appreciate your work of Koala to speed up the operations of Excel, and I think Koala could be a great help for my project, but I don't know exactly how I should do it. If you can offer some insights, that would be very helpful.

In a large Excel spreadsheet, there could be many intermediate sheets used for calculations, but we don't need it for presenting our final result. For example, "Sheet1!A1 = Sheet2!B1", and "Sheet2!B1 = 5". In this way, we don't need Sheet2 but only "5". Therefore, I want to compress the computation chains in a text file, and I use networkx to convert the whole spreadsheet into a gigantic graph.

First, I use Breadth First Search to iterate over the whole spreadsheet, and then I can figure out the sinks(those don't depend on other cells to get the value) of the graph. After getting the sinks, I can back-propagate the values to update all the cells. However, I used Formulas to evaluate the expression, but it does not support date-related functions. Therefore, I am wondering can I use Koala to replace Formulas to evaluate given expression, also could you please offer any advice for how I can speed up the whole calculations? Thank you very much!

Best, Hao Wang