Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/10/2009, 09:24
rgg
 
Fecha de Ingreso: junio-2007
Mensajes: 14
Antigüedad: 17 años
Puntos: 0
Problema co la carga de fichero en ListView

Hola. Estoy desesperado con un problema al tratar de cargar un figchero de texto separado por ";".

El txt es del tipo:

;1111;12.2.2009;3.33;0000001;15,00-;Z02;...
;222;12.2.2009;4.33;0000001;100,00;Z02;...
;1111;12.2.2009;3.56;0000020;3,00-;Z02;...

Es decir contiene puntos comas, guines... y no va entre comillas"", que sería lo ideal. En total el listview debería tener 16 columnas.


Código:
Dim itm As ListItem

Dim c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16 As String

    Open App.Path & "\test.txt" For Input As #1
    
    Do Until EOF(1)
            Input #1, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
            
            Set itm = lv.ListItems.Add(, , c1)
                       
            itm.SubItems(1) = c2
            itm.SubItems(2) = c3
            itm.SubItems(3) = c4
            itm.SubItems(4) = c5
            itm.SubItems(5) = c6
            itm.SubItems(6) = c7
            itm.SubItems(7) = c8
            itm.SubItems(8) = c9
            itm.SubItems(9) = c10
            itm.SubItems(10) = c11
            itm.SubItems(11) = c12
            itm.SubItems(12) = c13
            itm.SubItems(13) = c14
            itm.SubItems(14) = c15
            itm.SubItems(15) = c16
              
    Loop
    Close #1
Aqui podis ver dos ficheros:
Desde aquí podeis ver la imagen de mi listview: 3w.taurofoto.net/test_lv.jpg
Fichero txt: 3w.taurofoto.net/test.txt


Muchas gracias por vuestra ayuda!!!
saludos