|
Wx - Importar arquivo CSV - Procedure WS_ImportCSV |
Iniciado por Boller, 28,ago. 2015 20:36 - No hay respuesta |
| |
| | | |
|
| |
Miembro registrado 4.520 mensajes |
|
Publicado el 28,agosto 2015 - 20:36 |
Procedure WS_ImportCSV(sFullFileName is string)
sCsvSeparator is string = ";" sCsvRow is string nFileNum is int nLoop, Total is int nCol is int nJumCol is int = 1
nFileNum = fOpen(sFullFileName,foRead) IF nFileNum = -1 THEN Error("File not found!") ELSE LOOP sCsvRow=fReadLine(nFileNum) nCol=1 Total = Length(sCsvRow) FOR nLoop = 1 TO Total IF sCsvRow[[nLoop]] = sCsvSeparator THEN sCsvRow[[nLoop]] = TAB nCol ++ END END Info(sCsvRow)
IF sCsvRow = EOT THEN BREAK END fClose(nFileNum) END |
| |
| |
| | | |
|
| | | | |
| | |
|