我有一個形式,主要想法是,將允許用戶從Excel導入數據動態數據庫,他將指定他需要的信息的列顯示在下面從Excel導入數據到DataTable動態vb.net
,但是當我將數據傳輸到數據表我用差週期的圖像數據導入到一個數據表,但它最終總是看起來像下面
enter image description here圖像
這是我的代碼
昏暗dtTtable,tempdtTable,tmpClmDtTable作爲新的DataTable dtTtable = Ejecutar_Query( 「SELECT * FROM」 & ComboBoxEdit1.EditValue,FALSE)
For clmn = 0 To ImportacionDtTable.Rows.Count - 1
Dim sRange As String = ImportacionDtTable(clmn).Item(1)
If String.IsNullOrEmpty(sRange) = False Then
Dim nrw As DataRow = dtTtable.NewRow
tmpClmDtTable = New DataTable
tmpClmDtTable = GetDataExcel(OpenFileDialog1.FileName, SpreadsheetControl1.ActiveWorksheet.Name, sRange)
tempdtTable.Merge(tmpClmDtTable)
'tempdtTable = tmpClmDtTable.Copy
End If
Next
'dtTtable.AcceptChanges()
Dim tablas As New Form_Tabla
With tablas
.PdtTable = tempdtTable
.ShowDialog()
.Close()
End With
我有使用權的Marge現在只是展示它是如何在