Apparently there are several APIs for Excel online:
https://stackoverflow.com/questions/37757625/is-there-a-way-to-programatically-edit-office-365-excel-documents