在没有安装Excel的服务器上生成Excel文件 [英] Excel file generation on server without Excel installed

查看:400
本文介绍了在没有安装Excel的服务器上生成Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Microsoft.Office.Interop.Excel 并使用 SaveAs 方法生成Excel文件。这一切在Excel安装的计算机上正常工作。但是,我的服务器没有安装Excel。

I am using Microsoft.Office.Interop.Excel and generating Excel files using the SaveAs method. This all works correctly on computer with Excel installed. However, my server does not have Excel installed.

如何生成我的文件?

推荐答案

如果您使用Interop生成文件,则需要在服务器上安装Excel。

Microsoft不支持在服务器上安装Excel(或Word)。相反,您应该从Microsoft下载Office Open XML SDK,并使用该库生成Excel 2007文档。该库不需要在服务器上安装Excel:
http ://msdn.microsoft.com/en-us/office/ee441239.aspx

Microsoft doesn't support installing Excel (or Word) on the server. Instead you should download the Office Open XML SDK from Microsoft and use that library to generate Excel 2007 documents. This library does not require Excel to be installed on the server: http://msdn.microsoft.com/en-us/office/ee441239.aspx

这篇关于在没有安装Excel的服务器上生成Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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