Remove Quote from Writeline output
-
Hi - I have an app that reads a csv file line by line, parses for two fields, sends a query to a web server, receives four data fields back, and then writes an output line with the new fields followed by the contents of the input line. My problem is that the four fields are bracketed in quotes, and the entire input line is included in a set of quotes, so if I then open the output file with excel, the input line contents are treated as a single cell - not a series of csv fields. I then changed the code to loop through the fields and put commas in the string - but the output line still has quotes at the start and end of the string - so I I wan to use in Excel - I still need to open as a text file an strip out the pesky quotes. What to do ?? Here is the code doing the data assembly ID = ID + 1 WriteOutputLine = ID & "," & response.GeocodedAddresses(i).Alternatives(0).Quality.ToString & "," & HouseNo & "," & Street & "," & City & "," & State & "," & Zip & "," For DataFieldCount = 0 To lineArray.Length - 1 WriteOutputLine = WriteOutputLine & lineArray(DataFieldCount) & "," Next WriteLine(2, WriteOutputLine) Here is a sample input line . . 37.30840674,-122.0333179,-122.029614,37.30833842,1083.826,179,299,WGS 84,SCMAD20070713,Murky Pool,,7/13/2007 21:43,IMG_6212 copy_tag.jpg,IMG_6212 copy.jpg,,,585992.34,4129519.64,10 N,7/13/2007 14:43,,178.7832,100.2,,,,Canon Canon EOS DIGITAL REBEL XT Adobe Photoshop Elements 4.0 Windows Here is a sample output line "1,Exact,7360,Fallenleaf Ln,Cupertino,CA,95014,37.30840674,-122.0333179,-122.029614,37.30833842,1083.826,179,299,WGS 84,SCMAD20070713,Murky Pool,,7/13/2007 21:43,IMG_6212copy_tag.jpg,IMG_6212copy.jpg,,,585992.34,4129519.64,10 N,7/13/2007 14:43,,178.7832,100.2,,,,Canon Canon EOS DIGITAL REBEL XT Adobe Photoshop Elements 4.0 Windows," rfrank5356
-
Hi - I have an app that reads a csv file line by line, parses for two fields, sends a query to a web server, receives four data fields back, and then writes an output line with the new fields followed by the contents of the input line. My problem is that the four fields are bracketed in quotes, and the entire input line is included in a set of quotes, so if I then open the output file with excel, the input line contents are treated as a single cell - not a series of csv fields. I then changed the code to loop through the fields and put commas in the string - but the output line still has quotes at the start and end of the string - so I I wan to use in Excel - I still need to open as a text file an strip out the pesky quotes. What to do ?? Here is the code doing the data assembly ID = ID + 1 WriteOutputLine = ID & "," & response.GeocodedAddresses(i).Alternatives(0).Quality.ToString & "," & HouseNo & "," & Street & "," & City & "," & State & "," & Zip & "," For DataFieldCount = 0 To lineArray.Length - 1 WriteOutputLine = WriteOutputLine & lineArray(DataFieldCount) & "," Next WriteLine(2, WriteOutputLine) Here is a sample input line . . 37.30840674,-122.0333179,-122.029614,37.30833842,1083.826,179,299,WGS 84,SCMAD20070713,Murky Pool,,7/13/2007 21:43,IMG_6212 copy_tag.jpg,IMG_6212 copy.jpg,,,585992.34,4129519.64,10 N,7/13/2007 14:43,,178.7832,100.2,,,,Canon Canon EOS DIGITAL REBEL XT Adobe Photoshop Elements 4.0 Windows Here is a sample output line "1,Exact,7360,Fallenleaf Ln,Cupertino,CA,95014,37.30840674,-122.0333179,-122.029614,37.30833842,1083.826,179,299,WGS 84,SCMAD20070713,Murky Pool,,7/13/2007 21:43,IMG_6212copy_tag.jpg,IMG_6212copy.jpg,,,585992.34,4129519.64,10 N,7/13/2007 14:43,,178.7832,100.2,,,,Canon Canon EOS DIGITAL REBEL XT Adobe Photoshop Elements 4.0 Windows," rfrank5356