<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Loading (.csv) file to listview</title>
	<atom:link href="http://uiccs07.net/?feed=rss2&#038;p=59" rel="self" type="application/rss+xml" />
	<link>http://uiccs07.net/?p=59</link>
	<description>A Programmers thoughts</description>
	<lastBuildDate>Fri, 14 May 2010 09:19:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: William Moore</title>
		<link>http://uiccs07.net/?p=59&#038;cpage=1#comment-242</link>
		<dc:creator>William Moore</dc:creator>
		<pubDate>Fri, 14 May 2010 09:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://uiccs07.net/?p=59#comment-242</guid>
		<description>i do not have any good experience with Bidvertiser, they pay lower than Adbrite so i do not use them on my website.-&quot;-</description>
		<content:encoded><![CDATA[<p>i do not have any good experience with Bidvertiser, they pay lower than Adbrite so i do not use them on my website.-&#8221;-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hernan</title>
		<link>http://uiccs07.net/?p=59&#038;cpage=1#comment-48</link>
		<dc:creator>Hernan</dc:creator>
		<pubDate>Wed, 04 Nov 2009 16:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://uiccs07.net/?p=59#comment-48</guid>
		<description>the code I place here its programmed in Visual Basic Express 2008 :P , works for me and has a few spanish languague .. jejeje</description>
		<content:encoded><![CDATA[<p>the code I place here its programmed in Visual Basic Express 2008 <img src='http://uiccs07.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  , works for me and has a few spanish languague .. jejeje</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hernan</title>
		<link>http://uiccs07.net/?p=59&#038;cpage=1#comment-47</link>
		<dc:creator>Hernan</dc:creator>
		<pubDate>Tue, 03 Nov 2009 17:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://uiccs07.net/?p=59#comment-47</guid>
		<description>I used this one to load .cvs :

Private Sub CargarInfoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CargarInfoToolStripMenuItem.Click

        &#039;FUNCION PARA EL CARGAR DATOS O EL LOAD !!
        Dim TotalNombres, Cumpleanieros, HoyDia, HoyMes, HOY As String
        Dim elimextra, y As Integer
        Dim sPathCsv As String
        Dim sDelimitador As String

        Try   &#039; ABRE EL DIALOG BOX

            Dim filename As String
            filename = &quot;nada&quot;

            &#039;They want to do a SaveAs, so find out what they want to name the file

            Dim openFileDialog As OpenFileDialog = New OpenFileDialog()


            openFileDialog.Title = &quot;Open File&quot;
            openFileDialog.Filter = &quot;Files (*.csv)&#124;*.csv&#124;All Files (*.*)&#124;*.*&quot;


            openFileDialog.DefaultExt = &quot;csv&quot;


            openFileDialog.AddExtension = True


            If openFileDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then

                filename = openFileDialog.FileName

            ElseIf Windows.Forms.DialogResult.Cancel Then

                Exit Sub

            End If

            ListView1.Clear()
            ListView1.Columns.Add(&quot;Nombres&quot;).Width = 75
            ListView1.Columns.Add(&quot;Apellidos&quot;).Width = 75
            ListView1.Columns.Add(&quot;Dia&quot;).Width = 50
            ListView1.Columns.Add(&quot;Mes&quot;).Width = 50
            ListView1.Columns.Add(&quot;Año&quot;).Width = 50
            ListView1.Columns.Add(&quot;Hora&quot;).Width = 50
            ListView1.Columns.Add(&quot;Minuto&quot;).Width = 50
            ListView1.Columns.Add(&quot;Email&quot;).Width = 75
            ListView1.Columns.Add(&quot;Email&quot;).Width = 75
            ListView1.Columns.Add(&quot;Web&quot;).Width = 75
            ListView1.Columns.Add(&quot;Telefono&quot;).Width = 75
            ListView1.Columns.Add(&quot;Celular&quot;).Width = 75
            ListView1.Columns.Add(&quot;Foto&quot;).Width = 75
            ListView1.Columns.Add(&quot;Info&quot;).Width = 75
            ListView1.Columns.Add(&quot;Fecha De Captura&quot;).Width = 75

            With ListView1

                sPathCsv = filename
                sDelimitador = &quot;,&quot;
                &#039; recorre el vector y añade las cabeceras   


                &#039; Abre el archivo para leer cada línea   
                Dim sr As New IO.StreamReader(sPathCsv)
                Dim aDatos() As String &#039; vector para el cvs   

                &#039; recorrer todas las líneas hasta el final del archivo   
                Do While (sr.Peek &gt;= 0)
                    &#039; leer la línea y separar los datos con split   
                    aDatos = sr.ReadLine.Split(sDelimitador)

                    &#039; listview: Añadir los items y SubItems   
                    &#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;   
                    Dim Item As New ListViewItem(aDatos(0).ToString)
                    For i As Integer = 1 To UBound(aDatos)
                        With Item
                            .SubItems.Add(aDatos(i).ToString)
                        End With
                    Next
                    .Items.Add(Item)
                Loop
                sr.Close() &#039; cierra el streamReader   
            End With

            ListView1.Items(0).Remove() &#039;Elimina Primera Linea que es TITULO

            elimextra = ListView1.Items.Count - 1  &#039;Linea Extra se añadió

            ListView1.Items(elimextra).Remove()    &#039;Se Elimina esta linea extra

            &#039; error   

        Catch ex As Exception
            MsgBox(ex.Message.ToString, MsgBoxStyle.Critical)
        End Try

        &#039;/ La funcion que pinta de colores las líneas
        &#039;For i = 1 To ListView1.Items.Count Step 2
        &#039;ListView1.Items(i).BackColor = Drawing.Color.LightGray
        &#039;Next i

        &#039;CONTADOR EN MAIN
        TextBoxPersonasCapturadas.Text = ListView1.Items.Count

        &#039;AVISO DE CUMPLEAÑOS DE HOY
        HOY = DateTime.Now
        HoyDia = Mid(HOY, 1, 2)
        HoyMes = Mid(HOY, 4, 2)
        TotalNombres = ListView1.Items.Count

        For y = 1 To TotalNombres
            If HoyDia = ListView1.Items(y - 1).SubItems(2).Text And HoyMes = ListView1.Items(y - 1).SubItems(3).Text Then
                Cumpleanieros = &quot;SI&quot;
            End If
        Next

        If Cumpleanieros = &quot;SI&quot; Then
            MsgBox(&quot;Cumpleaños Presentes Para Hoy &quot;, MsgBoxStyle.Information, &quot;Aviso De Cumpleaños&quot;)
        End If
    End Sub</description>
		<content:encoded><![CDATA[<p>I used this one to load .cvs :</p>
<p>Private Sub CargarInfoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CargarInfoToolStripMenuItem.Click</p>
<p>        &#8216;FUNCION PARA EL CARGAR DATOS O EL LOAD !!<br />
        Dim TotalNombres, Cumpleanieros, HoyDia, HoyMes, HOY As String<br />
        Dim elimextra, y As Integer<br />
        Dim sPathCsv As String<br />
        Dim sDelimitador As String</p>
<p>        Try   &#8216; ABRE EL DIALOG BOX</p>
<p>            Dim filename As String<br />
            filename = &#8220;nada&#8221;</p>
<p>            &#8216;They want to do a SaveAs, so find out what they want to name the file</p>
<p>            Dim openFileDialog As OpenFileDialog = New OpenFileDialog()</p>
<p>            openFileDialog.Title = &#8220;Open File&#8221;<br />
            openFileDialog.Filter = &#8220;Files (*.csv)|*.csv|All Files (*.*)|*.*&#8221;</p>
<p>            openFileDialog.DefaultExt = &#8220;csv&#8221;</p>
<p>            openFileDialog.AddExtension = True</p>
<p>            If openFileDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then</p>
<p>                filename = openFileDialog.FileName</p>
<p>            ElseIf Windows.Forms.DialogResult.Cancel Then</p>
<p>                Exit Sub</p>
<p>            End If</p>
<p>            ListView1.Clear()<br />
            ListView1.Columns.Add(&#8220;Nombres&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Apellidos&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Dia&#8221;).Width = 50<br />
            ListView1.Columns.Add(&#8220;Mes&#8221;).Width = 50<br />
            ListView1.Columns.Add(&#8220;Año&#8221;).Width = 50<br />
            ListView1.Columns.Add(&#8220;Hora&#8221;).Width = 50<br />
            ListView1.Columns.Add(&#8220;Minuto&#8221;).Width = 50<br />
            ListView1.Columns.Add(&#8220;Email&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Email&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Web&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Telefono&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Celular&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Foto&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Info&#8221;).Width = 75<br />
            ListView1.Columns.Add(&#8220;Fecha De Captura&#8221;).Width = 75</p>
<p>            With ListView1</p>
<p>                sPathCsv = filename<br />
                sDelimitador = &#8220;,&#8221;<br />
                &#8216; recorre el vector y añade las cabeceras   </p>
<p>                &#8216; Abre el archivo para leer cada línea<br />
                Dim sr As New IO.StreamReader(sPathCsv)<br />
                Dim aDatos() As String &#8216; vector para el cvs   </p>
<p>                &#8216; recorrer todas las líneas hasta el final del archivo<br />
                Do While (sr.Peek &gt;= 0)<br />
                    &#8216; leer la línea y separar los datos con split<br />
                    aDatos = sr.ReadLine.Split(sDelimitador)</p>
<p>                    &#8216; listview: Añadir los items y SubItems<br />
                    &#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;<br />
                    Dim Item As New ListViewItem(aDatos(0).ToString)<br />
                    For i As Integer = 1 To UBound(aDatos)<br />
                        With Item<br />
                            .SubItems.Add(aDatos(i).ToString)<br />
                        End With<br />
                    Next<br />
                    .Items.Add(Item)<br />
                Loop<br />
                sr.Close() &#8216; cierra el streamReader<br />
            End With</p>
<p>            ListView1.Items(0).Remove() &#8216;Elimina Primera Linea que es TITULO</p>
<p>            elimextra = ListView1.Items.Count &#8211; 1  &#8216;Linea Extra se añadió</p>
<p>            ListView1.Items(elimextra).Remove()    &#8216;Se Elimina esta linea extra</p>
<p>            &#8216; error   </p>
<p>        Catch ex As Exception<br />
            MsgBox(ex.Message.ToString, MsgBoxStyle.Critical)<br />
        End Try</p>
<p>        &#8216;/ La funcion que pinta de colores las líneas<br />
        &#8216;For i = 1 To ListView1.Items.Count Step 2<br />
        &#8216;ListView1.Items(i).BackColor = Drawing.Color.LightGray<br />
        &#8216;Next i</p>
<p>        &#8216;CONTADOR EN MAIN<br />
        TextBoxPersonasCapturadas.Text = ListView1.Items.Count</p>
<p>        &#8216;AVISO DE CUMPLEAÑOS DE HOY<br />
        HOY = DateTime.Now<br />
        HoyDia = Mid(HOY, 1, 2)<br />
        HoyMes = Mid(HOY, 4, 2)<br />
        TotalNombres = ListView1.Items.Count</p>
<p>        For y = 1 To TotalNombres<br />
            If HoyDia = ListView1.Items(y &#8211; 1).SubItems(2).Text And HoyMes = ListView1.Items(y &#8211; 1).SubItems(3).Text Then<br />
                Cumpleanieros = &#8220;SI&#8221;<br />
            End If<br />
        Next</p>
<p>        If Cumpleanieros = &#8220;SI&#8221; Then<br />
            MsgBox(&#8220;Cumpleaños Presentes Para Hoy &#8220;, MsgBoxStyle.Information, &#8220;Aviso De Cumpleaños&#8221;)<br />
        End If<br />
    End Sub</p>
]]></content:encoded>
	</item>
</channel>
</rss>
