c# - Writeline not writing certain tabs to output file -
i trying write tab delimited text file info similar below:
colhead1 colhead2 ... colhead10 row1dat1 row1dat2 ... row1dat10 row2dat1 row2dat2 ... row2dat10
however, when debugging code, notice there few tabs don't appear. here code trying:
string columnheaders = string.format("colhead1\tcolhead2\tcolhead3\tcolhead4\tcolhead5\tcolhead6\tcolhead7\tcolhead8\tcolhead9\tcolhead10"); filew.writeline(columnheaders); string row1 = string.format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}", val1, val2, val3, val4, val5, val6, val7, val8, val9, val10); filew.writeline(row1); string row2 = string.format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}", val11, val12, val13, val14, val15, val16, val17, val18, val19, val20); filew.writeline(row2);
specifically, when @ value in row1 or row2, formatted below (on either row):
dat1 dat2(notabhere)dat3 dat4 dat5 dat6 dat7 dat8 dat9(notabhere)dat10
why aren't 2 tabs beingness inserted , can ensure they're inserted properly?
maybe tabs became little because preceding value wide?
0 1 2 15 162 102819201924 . . . . . . . .
c# string-formatting delimiter
No comments:
Post a Comment