How to preview or display or edit an Excel file on web page by C# and .NET framework

拟墨画扇 提交于 2020-03-27 11:53:08

问题


Working on a task that displaying or previewing an excel file, which generated by EPPlus, on web page (.aspx).

Now, my problem is all the source point to the keywords: excel web app, excel web service, sharepoint or Excel online, but when i dug into those keywords i lose myself. Most of the information are about how to do the task inside the excel, such as save as html, publish to sharepoint etc. And the rest of the information are delivered by brain-unfriendly example or language.

So I am wondering can someone give me a walk-through method about publishing or displaying or previewing or editing an Excel file on web page(.aspx) by C# language and .NET framework.

Thanks.


回答1:


You can't natively modify Excel files in web browsers. Browsers can support some files such as Java Applets or Adobe Flash, but those requires plugins, and they don't exist for Excel files.

Instead, you should create an HTML representation of the Excel file, and allow the user to then manipulate the HTML representation. When they're done, generate an Excel file based on their changes.

Alternatively, allow the user to download the Excel file and make their changes, and allow them to publish the changes back to the server by uploading the file.



来源:https://stackoverflow.com/questions/27450739/how-to-preview-or-display-or-edit-an-excel-file-on-web-page-by-c-sharp-and-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!