我有这一行,如何在文本中附加变量以构成标题?
StringBuilder sb = new StringBuilder();
week6 = model.SelectedSunday.AddDays(-7);
week5 = week6.AddDays(-7);
week4 = week5.AddDays(-7);
week3 = week4.AddDays(-7);
week2 = week3.AddDays(-7);
week1 = week2.AddDays(-7);
sb.AppendLine("Title, Total, " week6, week5, week4, week3, week2, week1 );
还有这段代码:
var tradesmenReportData = _reportingService.GetTradeUKKPITradesmen(model.SelectedSunday);
var jobSortedReportData = _reportingService.GetTradeUKKPIJobSorted(model.SelectedSunday);
foreach (var item in tradesmenReportData)
{
sb.AppendLine(String.Concat("\"", item.Title, "\", item.Total, "\", item.Week6, "\", ", item.Week5, "\", ", item.Week4, "\", ", item.Week3, "\", ", item.Week2, "\", ", item.Week1));
}
在输出文件(excel)中,值有一个“附加到值?在上面的某处有一个额外的”。我哪里出错了?
谢谢