C#NET2008将XML文件数据直接传输到EXCEL 2003电子表格 [英] C#NET2008 Transfer XML File data directly to EXCEL 2003 Spreadsheet

查看:98
本文介绍了C#NET2008将XML文件数据直接传输到EXCEL 2003电子表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hullo Good Guys,   :laugh: 
I need your help. Please help me.

I am very desperate to get the application working. I have been asked by the Project Manager to develop C#NET2008 Window application using Microsoft EXCEL 2003 with functionality to use OpenFileDialog for user to select XML File and transfer it directly to EXCEL 2003 spreadsheet.

My codings are not working as I have done not it before.
This coding generate error messages
xlWKBook.OpenXML(strXMLFile, oMissing, oMissing);

Error 3 Use of unassigned local variable 'xlWKBook'    :( 
--------------------------------------------------------------------

HERE ARE THE OVERALL CODING:

  private void BtnExportXMLToExcel_Click(object sender, EventArgs e)
   {
     string strXMLFile = @txtXMLFile.Text;
     object oMissing = System.Reflection.Missing.Value;

     Excel.Application xlApp = new Excel.ApplicationClass();
     Excel.Workbooks xlWKBook;
     Excel.Worksheets xlWKSheet;
     xlWKBook.OpenXML(strXMLFile, oMissing, oMissing); < -- error
   }



请帮我.谢谢.



Please help me. Thank you.

推荐答案

http://support.microsoft.com/kb/307029 [^ ]

点击此链接,它将指导您完成这些步骤.
http://support.microsoft.com/kb/307029[^]

follow this link it should guide you through the steps.


这篇关于C#NET2008将XML文件数据直接传输到EXCEL 2003电子表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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