可以从已安装的软件打开文件 [英] Possible to open file from installed Software

查看:71
本文介绍了可以从已安装的软件打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道可以从客户端计算机上安装的软件打开Office文件.


或有任何插件可用于在浏览器中查看文档.如果有的话,请告诉我.

在此先感谢...
Mitesh

i want to know that it is possible to open office file from client machine installed software.


or There is any plug ins for view the document inside the browser. If any please Tell Me.

Thanks In Advance...
Mitesh

推荐答案

我已经使用C#从Excel中完成了工作,这是新excel文件的代码.

I have done stuff with Excel from C#, and this is the code to for a new excel file

var xlApp = new Excel.Application();
var xlWorkBook = xlApp.Workbooks.Add();
var xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);



在使用excel应用程序完成后,请执行以下操作:



after finishing with the excel app do the following:

xlWorkBook.SaveAs(fileName);
xlWorkBook.Close();
xlApp.Quit();



您将需要添加以下using语句:



You will need to add the following using statement:

using Microsoft.Office.Interop.Excel;



还有一个词interopt,但尚未使用该词.



There is also the Word interopt, but have not worked with that one.


这篇关于可以从已安装的软件打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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