この行がありますが、見出しを構成するために変数をテキストに追加するにはどうすればよいですか?
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)で、値に「値が追加されていますか?上の行のどこかに余分な」があります。どこが間違っていますか?
ありがとう