Jump to content

Doppel array


 Share

Recommended Posts

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

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 by 19alex95
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...