PC Review


Reply
Thread Tools Rate Thread

CSV-Datei einlesen

 
 
Matthias von Deetzen
Guest
Posts: n/a
 
      30th Mar 2005
Hallo zusammen,

ich suche eine Möglichkeit eine CSV Datei in einem DataGrid anzuzeigen.

Mfg

Matthias





 
Reply With Quote
 
 
 
 
Crouchie1998
Guest
Posts: n/a
 
      30th Mar 2005
English please

Something to do about a CSV date in a datagrid I think


 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      30th Mar 2005
Matthias,

See this old sample of me, be aware of the csv delimiter I don't know if it
is in Germany/Swiss/Italy/Austria/Belgia/Liechtenstein a semicolon or a
comma. Next time please in English, that is the used language in this
newsgroup, although many are not native English speakers.


\\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim file As String = "Test2.txt"
Dim path As String = "C:\Test1\"
Dim ds As New DataSet
Try
Dim f As System.IO.File
If f.Exists(path & file) Then
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended Properties=""Text;HDR=No;FMT=Delimited\"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " & _
file, conn)
da.Fill(ds, "TextFile")
End If
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
DataGrid1.DataSource = ds.Tables(0)
End Sub
///
I hope this helps a little bit?

Cor>


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      30th Mar 2005
"Matthias von Deetzen" <(E-Mail Removed)>
schrieb:
> ich suche eine Möglichkeit eine CSV Datei in einem DataGrid anzuzeigen.


Notice that this is an English language group. You'll find connection
strings for connecting to CSV files at
<URL:http://www.connectionstrings.com/>.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
4GB Datei Timo Diet Microsoft Access 2 28th Nov 2005 10:46 AM
Daten aus einer Website einlesen Maximilian Hofer Microsoft VB .NET 8 15th Mar 2005 12:59 PM
.resx-Datein einlesen/wegschreiben Nadja Schmitt Microsoft C# .NET 1 7th Dec 2004 09:52 AM
Re: prn-Datei _ Windows XP New Users 0 25th Nov 2003 12:25 AM
Textfile beim Einlesen Zerstückeln? Michael Schindler Microsoft C# .NET 1 20th Nov 2003 08:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 AM.