Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Saving ARRAY Data to CSV File to be used in different macro
#1
Hello All,

I am working on a project that has to steps. The first step I have already programed and is working really well however I need to pass the Array data from the first step to the second step. The macros are not setup to run right after each other because you may do the first step in the morning and then wait to do the second step until the afternoon. Anyway, I was trying to use the code below to pass the data to a CSV file and then when you are ready to run the second step the second macro will get the CSV file and ready it back into an array.

Also I thought I would mentiont that my user defined function, "QuoteDate" builds the array and has worked with every other macro I have written that uses this function.

Code:
Copy      Help
str s.getsel
str s1 s2 f
ARRAY(str) a.create(10)
QuoteData(a s)
f="$my qm$\test.csv"
s1=F"{a[0]},{a[1]},{a[2]},{a[3]},{a[4]},{a[5]},{a[6]},{a[7]},{a[8]},{a[9]},{a[10]}"
s1.setfile(f)

The problem is that I get a runtime error on line "s1=F"{a[0]},{a[1]}..." that says invalid index. Any help to solve this problem would be great.

Thanks,

Paul Daugs


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)