Uprav si pred importom do excelu zdrojový textový súbor...
Narýchlo napísaný skript - uprav si názov vstupného a výstupného súboru:
Set oReadObj = CreateObject("Scripting.FileSystemObject")
Set oWriteObj = CreateObject("Scripting.FileSystemObject")
Set oRead = oReadObj.OpenTextFile("input.txt", 1)
Set oWrite = oWriteObj.CreateTextFile("output.txt", True)
Dim strLine
Dim intLineCounter
intLineCounter = 0
Do Until oRead.AtEndOfStream
if intLineCounter <> 0 then
strLine = (strLine + " " + oRead.ReadLine)
else strLine = (strLine + ORead.ReadLine)
end if
intLineCounter = intLineCounter + 1
if intLineCounter = 10 then
oWrite.WriteLine(strLine)
intLineCounter = 0
strLine = ""
end if
Loop
oWrite.Close() ' Close output file
oRead.Close() ' Close input file
msgbox("Skript bol úspešne ukončený")
Vyššie uvedený skript si ulož do nejakého svojho súboru a daj mu príponu *.vbs. Následne spusti poklepaním na neho (ako *exe).