Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
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.
Posted

1 solution

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

follow this link it should guide you through the steps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900