Question: Problem:Using the code of Figure 3 Code in other toconvert the data . txt file in to Excel data File in toTEXT data files. Click

Problem:Using the code of Figure 3 Code in other toconvert the data .txt file in to Excel data File in toTEXT data files. Click the image to downloaddata.dta-NctepadPhil:HelDulcehilip Gent Male rancsUnited es/2e1seretda Hapood Fenale nited StatescitainEtta Hurn enieVincenz. e lanArcella Bouska FemaleSherron AscencioKina HareltoninardOption ExplicitLastFemaleoceta cueren Feale FrareBelinda Partain Fenale tnited StatesHolly udy ealeLibble Dalby Female France 42End SubGendeFenale Uni ted StatesGreat Britain 39Fenale Great BritainFenale Great Britain 313116/08/201615/1e/2873579Dim i As IntegerDim char As StringCountry AgeteNote that the indexing for the returnArray array is et up' for 1-based indexing.Sub ParseLine(dataLine As String, delimiter As String,Current Text = umDate Id15/20/20?48/85/2815Nvalues As Integer, returnArray() As String)char = Mid(datalLine, i,1)ReDim returnArray(counter)21/e5/2815counter= counter +16/08/201621/85/21s/10/017256421/85/2e1: sA89Next i16/08/2816For i =1 To Len(dataLine)nValues = counterElse1252'This sub parses a line of data from the text file into individual pieces of data.It returns an array of the pieces of data and number of pieces (in nValues).Dim counter As Integer counts the pieces of data in the lineDim currrentText As String ' text since last commaGo through the string a character ata time.Counter counts the number of pieces of data in the line.counter =1currenttext & Mid(dataLine, i,1)End IfcurrentText is any piece of data in the line, where the piecesseparated by commas.Get the character in position i.1582354965482596597Check if the character is a comma or the last character in the string.If char = delimiter ThenElself i = Len(dataLine) ThenreturnArray(counter)= currenttextGet ready for the next piece of data.CurrentText = m'Capture this last piece of data and return the number of pieces.currentText = currentText & Mid(dataLine, i,1)ReDim Preserve returnArray(counter)returnArray(counter)= currenttextare'Add this character to the currenttext string.currentText =Shavon Benito Fenale France
 Problem:Using the code of Figure 3 Code in other toconvert the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!