Jump to content

Recommended Posts

Posted

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])
Posted (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 by 19alex95
Posted

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]
Posted (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 by 19alex95
Posted

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.

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
  • Recently Browsing   0 members

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