Click here to Skip to main content
14,634,503 members
Rate this:
Please Sign up or sign in to vote.
See more:
I made an ASP.Net website application with an embedded excel spreadsheet. I am trying to update chosen cells in the embedded spreadsheet with values calculated by the application. I am somewhat familiar with writing data with EPPlus, but how would I write data if the spreadsheet is on a webpage?

I embedded the excel spreadsheet from onedrive like this:

<iframe width="700" height="346" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid=2EE19DD0B45C2F85%2156362&authkey=%21ADBOB19N8S5Z2wo&em=2&AllowTyping=True&wdHideGridlines=True&wdHideHeaders=True&wdDownloadButton=True&wdInConfigurator=True"></iframe>


What I have tried:

Opening the excel spreadsheet on my computer worked in testing, but since I am deploying the site to users it is best to open spreadsheet in web browser
Posted
Updated 16-Oct-18 8:04am
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't edit an embedded Excel Online workbook, but people with the right permission may be able to open the embedded workbook in Excel, where they can edit the data.
   
Comments
Member 13396929 16-Oct-18 14:20pm
   
In that case, instead of embedding, could i just store the excel spreadsheet in the website and have the user open it?
Kornfeld Eliyahu Peter 16-Oct-18 14:25pm
   
Yes, but in that case all the instances (onedrive, the website and the enduser) will be disconnected... which means that changes to one will not reflect on others...
Member 13396929 16-Oct-18 14:30pm
   
okay, so even if I save the c# value in an ASP.Net HiddenField i can't write it to Excel? And, I am trying to write to Excel, but the changes a user makes are not meant tot be saved after closing
Kornfeld Eliyahu Peter 16-Oct-18 15:01pm
   
If changes are not meant to be save, why enable changes in the first place?
MadMyche 16-Oct-18 15:14pm
   
Perfect. Have them download a copy of the Excel file so that the master doesn't get changed.
Member 13396929 16-Oct-18 15:26pm
   
@Kornfield because I want the user to use the excel formulas to do certain calculations in a particular cell. But I don't want the changes to save permanently because multiple users need to use the spreadsheet. I think I'll do what @MadMyche said and have them download a copy of spreadsheet

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100