Results 1 to 9 of 9

Thread: Adding a reference to Microsoft.Office.Interop.Excel disables New DataTables

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2011
    Location
    Minneapolis
    Posts
    39

    Adding a reference to Microsoft.Office.Interop.Excel disables New DataTables

    Hi:

    I had some code working to my satisfaction. As a final step, I added a reference to 'Microsoft.Office.Interop.Exce', and now my Data Tables produce errors. Apparently, I am no longer allowed to instantiate a DataTable.

    Code:
    Imports System.Data.OleDb
    Imports Microsoft.Office.Interop.Excel
    
    
    Public Class Form1
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim ds1 As String = "\\stylmark.com\fs-styl\Public\HISTORY\icedet 12mos122912.xlsx"
            Dim ss1 As String = "SELECT [Item], [SONbr], [OrdDate], [Eng], [Cfg#Rev] FROM [MASTER$] " & _
                                "ORDER BY [Item] DESC "
            Dim dt1 As New DataTable
            dt1.Columns.Add("Item", GetType([String]))
    ---

    I have n attachment that illustrates the problem.

    Thanks in advance for the help.
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width