动态创建Excel电子表格服务器端 [英] creating excel spreadsheets server side dynamically

查看:77
本文介绍了动态创建Excel电子表格服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我试图找出创建excel的最佳方式

电子表格,这需要动态完成通过aspx网站

服务器端。


主要方式是使用
$ b时可用的Excel com对象$ b你已经安装了excel,但是由于这是完成服务器端我需要

以确保它不会生成任何对话框错误消息。

也是关于线程的问题。


我在网上找到的大多数例子看起来都很旧,有

最近有人可以分享他们的想法吗?。


任何帮助表示赞赏。


问候。

解决方案

" Andy Burchill" < an ********** @ clara.co..ukwrote in message

news:11 **************** @ iris.uk.clara.net ...


我试图找出创建Excel电子表格的最佳方法

是,这需要由服务器上的aspx网站动态完成




主要方式是使用Excel com对象

你有excel安装时可用



你不能做Office的服务器端自动化 - 微软不支持它

因为它不起作用:
http://support.microsoft.com/default...US;q257757#kb2


还有关于线程的担忧。



线程将是你最不担心的,相信我!我甚至不打算考虑这个......


我在网上找到的大多数例子似乎都很旧,有没有最近做过这件事的人可以分享他们的想法吗?



有三种方法可以满足您的需求:


1)使用HTML

创建一个HTML文档,然后为其提供.xls扩展名。这非常简单,而且是免费的 - 但是,您将无法拥有多个工作表。


2)使用XML
http ://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en


这是非常强大的,而且是免费的,但绝对不是为了

胆小的...


)使用Aspose
http:// www .aspose.com / Products / Aspos ... s / Default.aspx


这是非常强大且非常容易使用,但它不是免费的。

-
http://www.markrae.net


6月5日,10:34,Andy Burchill< andyburch ... @ clara.co..ukwrote:


你好,


我试图找出创建excel的最佳方式

电子表格,这需要动态完成一个aspx网站

服务器端。


主要方式是使用
$ b $时可用的Excel com对象b你已经安装了excel,但是由于这是在服务器端完成的,我需要

以确保它不会生成任何对话框错误消息。

也是关于线程的问题。


我在网上找到的大多数例子看起来都很旧,有

最近有人可以分享他们的想法吗?。


任何帮助表示感谢。


问候。



以csv格式导出数据。稍后可以使用

Excel或记事本打开csv文件,但仍然是免费的。


-pb-写道:


以csv格式导出数据。稍后csv文件可以使用

Excel或记事本打开,仍然是免费的。



这当然是一种选择,但我感兴趣在excel文件中做一些

格式化。它应该是一种订单形式

所以让它看起来不错将是有益的。有许多不同类型的产品,但它需要能够动态生成。


问候。


Hi there,

I am trying to find out what the best way of creating an excel
spreadsheet is, this will need to be done dynamically by an aspx website
on the server side.

The main way would be to use the Excel com object that is available when
you have excel installed, however since this is done server side I need
to be sure that it won''t generate any dialog box error messages. There
are also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.

Regards.

解决方案

"Andy Burchill" <an**********@clara.co..ukwrote in message
news:11****************@iris.uk.clara.net...

I am trying to find out what the best way of creating an excel spreadsheet
is, this will need to be done dynamically by an aspx website on the server
side.

The main way would be to use the Excel com object that is available when
you have excel installed

You can''t do server-side automation of Office - Microsoft don''t support it
because it doesn''t work:
http://support.microsoft.com/default...US;q257757#kb2

There are also concerns about threading.

Threading will be the least of your worries, believe me! Don''t even
contemplate this...

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

There are three ways to achieve what you need:

1) Use HTML
Create an HTML document and then give it a .xls extension. This is extremely
easy, and is free - however, you won''t be able to have multiple worksheets.

2) Use XML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

This is extremely powerful, and is free, but is most definitely not for the
faint-hearted...

3) Use Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx

This is extremely powerful and extremely easy to use, but it''s not free.
--
http://www.markrae.net


On 5 Jun, 10:34, Andy Burchill <andyburch...@clara.co..ukwrote:

Hi there,

I am trying to find out what the best way of creating an excel
spreadsheet is, this will need to be done dynamically by an aspx website
on the server side.

The main way would be to use the Excel com object that is available when
you have excel installed, however since this is done server side I need
to be sure that it won''t generate any dialog box error messages. There
are also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.

Regards.

Export the data in csv format. Later on csv file can be open using
Excel or notepad and still its free.


-pb- wrote:

Export the data in csv format. Later on csv file can be open using
Excel or notepad and still its free.

That is certainly one option, however I was interested in doing some
formatting in the excel file. Its supposed to be a kind of order form
so making it look good would be beneficial. There are many different
types of product though so it needs to be able to be generated dynamically.

Regards.


这篇关于动态创建Excel电子表格服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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