Why is Excel adding quotation marks?

Viewed 36

My application writes data into a column of a worksheet

Dim dest As Range
Set dest = Range("A1:A1")

dest.Cells(1) = "NUMBER_OF_FIELDS"
dest.Cells(2) = "BEGIN_DATA_FORMAT"
dest.Cells(3) = "SAMPLE_ID"
dest.Cells(4) = "END_DATA_FORMAT"
dest.Cells(5) = ""
dest.Cells(6) = "NUMBER_OF_SETS" & vbTab & numRows
dest.Cells(7) = "BEGIN_DATA" & vbTab & "LAB_L" & vbTab & "LAB_A" & vbTab & "LAB_B"

When I copy the worksheet column and paste it into a blank text document (Windows Notepad), lines six and seven are surrounded by quotation marks, e.g.,

"NUMBER_OF_SETS 52"
"BEGIN_DATA    LAB_L   LAB_A    LAB_B"

If I replace the vbTab character by a space, lines six and seven are no longer quoted. This is not a solution, because tabs are required. Why is this happening, and how do I fix it?

0 Answers
Related