I am currently undertaking a small project to reformat fixed with data into ms excel.
I am currently able to read a text file to the end and output a string of data into an array, and thereafter insert this data logically into a column with ms excel.
I am having an issue when recreating this onto columns using different substring, each record read is skipped by one?
How can i also do this more effectively as i have like 30 other files with +/- 70 substring instances that i need to segment out in ms excel.
See below code :
Do While objSFR.Peek <> -1
writestring = objSFR.ReadLine.Substring(0, 17)
cellno = cellno + 1
cellnm = "A"
cellnm = cellnm + cellno.ToString()
cellnm = cellnm.Replace(" ", "").ToString().Trim()
oSheet.Range(cellnm.ToString().Trim()).Value = writestring
Bookmarks