Heh, I'll be honest, I don't really understand much of what you do in xlLib.udf, I've just been using it as a "black box". I have had some formal training in Java, so that helps with the logic building stuff, everything else I try to pick up as I have to use it.

I tried it with this line:

$ = xlRangeValue($oXL, $Col + CStr($Row), $aryData, 'Sheet1')

It ran the script, created a .xls file, but the file was blank. So I tried a simpler loop to just place data, little tweaking and it worked. Now I will work on the multiple tabs, and probably try putting the whole block of code as a function.

Edit: Also, I was running this with Office 07 installed, don't know if that could be an issue.

 Code:
If Open(2,'C:\KIX\732AMS.csv') = 0
  $aryData = CSV(ReadLine(2))
	While Not @ERROR
		
	 For $I = 0 To UBound($aryData)
 	 	$oXL.Cells($Col, $Row).Value = $aryData[$I]
		$Row = $Row +1
	 Next
	 $Row = 1
	 $Col = $Col + 1	
       $aryData = CSV(ReadLine(2))	
	Loop
  $ = Close(2)
Else
  MessageBox("ERROR", "", 64)
EndIf


Edited by CTT (2008-07-31 01:01 AM)
Edit Reason: add info.