2010-12-13 5 views
0

Windowsアプリケーションでrange excelオブジェクトを使用して、1つのExcelファイルデータの内容を別のExcelファイルにエクスポートしています。オブジェクトを宣言しているときに、type excelオブジェクト宣言されていない..ここに私のコードです。WindowsアプリケーションでのExcelのインポートステートメント

Dim excelApp As excelobject 
    'string filePath = "D:\Test.xls" 
    excelApp = New Excel.Application() 
    excelWorkBook = excelApp.Workbooks.Open(epath) 
    excelWorkSheet = (Excel.Worksheet)excelWorkBook.Worksheets.get_Item(1) 
    excelWorkSheet.Copy(Type.Missing, Type.Missing) 
    excelWorkSheet = excelApp.Workbooks[2].Sheets[1] 




if (excelWorkBook != null) 

    excelWorkBook.Close() 
    End If 

    if (excelApp != null) 

    excelWorkBook = excelApp.Workbooks.Open("D:\Test-1.xls") 
    excelApp.Quit() 

    this.releaseObject(excelWorkSheet) 
    this.releaseObject(excelWorkBook) 
    this.releaseObject(excelApp) 


    End If 

答えて

1

これはどういう意味ですか?

Imports Microsoft.Office.Interop.Excel 
関連する問題