added column date and time for excel
This commit is contained in:
parent
56fa65bd19
commit
a13ad1a718
@ -42,6 +42,7 @@ func WriteDataToExcel(buffer io.Writer, questions []model.Question, answers []mo
|
||||
})
|
||||
|
||||
headers := []string{"Данные респондента"}
|
||||
headers = append([]string{"Дата и время"}, headers...)
|
||||
mapQueRes := make(map[uint64]string)
|
||||
|
||||
for _, q := range questions {
|
||||
@ -89,10 +90,15 @@ func WriteDataToExcel(buffer io.Writer, questions []model.Question, answers []mo
|
||||
}
|
||||
}()
|
||||
|
||||
if err := file.SetCellValue(sheet, "A"+strconv.Itoa(row), results[session].Content); err != nil {
|
||||
if err := file.SetCellValue(sheet, "A"+strconv.Itoa(row), results[session].CreatedAt.Format("2006-01-02 15:04:05")); err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
count := 2
|
||||
if err := file.SetCellValue(sheet, "B"+strconv.Itoa(row), results[session].Content); err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
|
||||
count := 3
|
||||
|
||||
for _, q := range questions {
|
||||
if !q.Deleted && q.Type != model.TypeResult {
|
||||
index := binarySearch(response, q.Id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user