the above is saved in a notepad, I wanna copy and paste this into an excel sheet. Name, number, email & city values should be split and written in each columns. Next record should go to second row. How to achieve this? Someone please help me on this.
The first line reads a file “yourfile.txt” line for line and gives an array (a list) of strings (text-bits).
For each will go through these strings one at a time, and put each into a variable called item. This item will now represent the current line of text that we are working on.
Split.String(item, “|”) takes a string (item) and a split-string (“|”) and splits the first every time it finds the second.
The result of this is also a string with each column of the row you are manipulating.
Each of these can be referenced through Splititem[0], Splititem[1], etc.
The next thing you need to do is the code for actually writing to cells in an open spreadsheet.