Excel to online portal like online excel



I am finding it difficult to write local excel data to online portal excel file. The problem that i see here is the input fields are not fixed .
Can anyone please suggest if we can dynamically loop the destination .
I have already fetched data from local excel file and saved into data table but finding it difficult inside for each to write data to online excel file.