从C#没有Office创建的Excel文件 [英] Create Excel files from C# without office

查看:378
本文介绍了从C#没有Office创建的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  创建从C​​#的Excel(.xls和.XLSX)文件

Possible Duplicate:
Create Excel (.XLS and .XLSX) file from C#

我写一个生成Excel报表,当前使用的Microsoft.Interop.Excel参考的方案。我开发的计算机上有Excel中,但最终用户可能会或可能不会安装了Office。如果最终用户的计算机上没有安装的Office将这个工具失败,或者是这样的互操作服务,距离实际应用?

I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference. My dev computer has Excel on it, but the end user may or may not have Office installed. Will this tool fail if Office isn't installed on the end users computer, or is this interop service separate from the actual application?

推荐答案

除非您已经安装了服务器/ PC上的Excel或使用外部工具(这是可能的,而不使用Excel互操作,看的Create的Excel(.xls和.XLSX)从C#)文件,将失败使用互操作需要安装Excel中。

Unless you have Excel installed on the Server/PC or use an external tool (which is possible without using Excel Interop, see Create Excel (.XLS and .XLSX) file from C#), it will fail. Using the interop requires Excel to be installed.

这篇关于从C#没有Office创建的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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