Microsoft.Office.Interop.Excel API 应用(一)ExcelApplication

1. 项目中添加引用“Microsoft.Office.Interop.Excel” ;

2. 添加using “”using Microsoft.Office.Interop.Excel;

 

Code:

using System.Threading;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System;
using Microsoft.Office.Interop.Excel;namespace OfficeUtility
{/// /// Start an excel process with some parameters setting/// public class ExcelApp : IDisposable{[DllImport("user32.dll")]static extern int GetWindowThreadProcessId(int hWnd, out int lpdwProcessId);private Application excelAppInstance = null;public Application ExcelAppInstance{get{return excelAppInstance;}}/// /// Create an new excel app instance/// /// 


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部