Please Look into this
You could use tables to perform you calculations and then save result back to excel file.