19alex95 Posted January 10, 2009 Share Posted January 10, 2009 hi I need a Doppel indexed array or so. I need this for my Databank with acsv data. please help my (I need a exsample) thx That have I programer Opt('MustDeclareVars', 1) Local $j,$line,$file,$datensatz,$array $file = FileOpen("test.csv", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $j = 0 While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $array = StringSplit($line, ';') For $i = 1 to 7 Dim $array[$i]=$datensatz [$j] [$i] next $j=$j+1 Wend FileClose($file) MsgBox(0,"Hi",$datensatz[1] [4]) Link to comment Share on other sites More sharing options...
Andreik Posted January 10, 2009 Share Posted January 10, 2009 Maybe $datensatz[$j][$i] = $array[$i], it make sense. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
19alex95 Posted January 10, 2009 Author Share Posted January 10, 2009 (edited) it show C:\Dokumente und Einstellungen\Alexander\Desktop\test4.au3 (19) : ==> Array variable subscript badly formatted.: Dim $Datensatz [$j] [$i] = $array [$i] Dim $Datensatz [^ ERROR what is wrong?? Edited January 10, 2009 by 19alex95 Link to comment Share on other sites More sharing options...
Andreik Posted January 10, 2009 Share Posted January 10, 2009 it show C:\Dokumente und Einstellungen\Alexander\Desktop\test4.au3 (19) : ==> Array variable subscript badly formatted.: Dim $Datensatz [$j] [$i] = $array [$i] Dim $Datensatz [^ ERROR what is wrong??I don't understand what you want to do. You need to declare an array Dim $Datensatz[number][number] and then populate the array with data from file $Datensatz[$j][$i] = $array[$i] When the words fail... music speaks. Link to comment Share on other sites More sharing options...
19alex95 Posted January 10, 2009 Author Share Posted January 10, 2009 (edited) I want make a Programm that is a adress databank with a csv data. The Program shall read the data and split it. exemble: $daten[column][line] Msgbox(0,"",column&line) Edited January 10, 2009 by 19alex95 Link to comment Share on other sites More sharing options...
Andreik Posted January 10, 2009 Share Posted January 10, 2009 I want make a Programm that is a adress databank with a csv data. The Program shall read the data and split it. exemble: $daten[column][line] Msgbox(0,"",column&line)Maybe is more easy with Excel. Look at functions in help file. Upload an example of this file type. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
19alex95 Posted January 10, 2009 Author Share Posted January 10, 2009 I mean thathttp://www.autoitscript.com/forum/index.php?showtopic=80034now I have it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now