Hi All,
I would like to know how you would take a FileLineRead and insert it into an array which then inserts it into Excel?
One thing to know is the files content is broken up, so I only use half of the content within $FileRead1.
So its imperative that the $value1, $value2, etc variables be used.
Code below:
$FileRead1 = FileReadLine("C:\temp\sample.txt",1)
For $count = 1 To _FileCountLines($FileRead1) Step 1
$string = FileReadLine($FileRead1, $count)
$input = StringSplit($string, ",", 1)
$value1 = $input[1]
$value2 = $input[2]
$value3 = $input[3]
$value4 = $input[4]
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value1, "A1")
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value2, "B1")
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value3, "C1")
_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value4, "D1")
Next