操作Excel慢的问题
还没开始读写Excel,程序启动特别的慢。
我的代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop.Excel;
using Microsoft.Office.Core;
namespace WindowsFormsApplication1 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private Microsoft.Office.Interop.Excel.Application xlApp ;
private void Form1_Load(object sender, EventArgs e) {
xlApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
if (xlApp == null) { MessageBox.Show("Can't open Excel!"); return; }
}
}
}
窗口半天才出现,究竟是为什么????