如何通过C#和.NET框架在网页上预览或显示或编辑Excel文件 [英] How to preview or display or edit an Excel file on web page by C# and .NET framework

查看:2322
本文介绍了如何通过C#和.NET框架在网页上预览或显示或编辑Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

处理显示或预览EPPlus生成的Excel文件(.aspx)的任务。

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

现在,我的问题是关键字的所有来源:excel web app,excel web service,sharepoint或Excel在线,但是当我挖掘这些关键字时,我输了我。大部分信息是关于如何在excel中执行任务,例如保存为html,发布到sharepoint等。其余的信息都是以不友善的例子或语言提供的。

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.

所以我想知道有人可以给我一个关于通过C#语言和.NET框架在网页(.aspx)上发布或预览或编辑Excel文件的步骤方法。

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.

谢谢。

推荐答案

您无法本机修改Excel文件在网络浏览器。浏览器可以支持一些文件,如Java Applet或Adobe Flash,但是这些文件需要插件,Excel文件不存在。

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.

相反,您应该创建一个HTML表示Excel文件,并允许用户操纵HTML表示。完成后,根据更改生成Excel文件。

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.

或者,允许用户下载Excel文件并进行更改,并允许他们通过上传文件将更改发布回服务器。

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.

这篇关于如何通过C#和.NET框架在网页上预览或显示或编辑Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆