mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat(BE-281): change template excel
This commit is contained in:
Binary file not shown.
@@ -49,7 +49,12 @@ func parseBodyWeightExcelReader(reader io.Reader) ([]BodyWeightExcelRow, error)
|
||||
return nil, fiber.NewError(fiber.StatusBadRequest, "no sheets found in file")
|
||||
}
|
||||
|
||||
rows, err := xlsx.GetRows(sheets[0], excelize.Options{RawCellValue: true})
|
||||
sheetName := sheets[0]
|
||||
if len(sheets) > 1 {
|
||||
sheetName = sheets[1]
|
||||
}
|
||||
|
||||
rows, err := xlsx.GetRows(sheetName, excelize.Options{RawCellValue: true})
|
||||
if err != nil {
|
||||
return nil, fiber.NewError(fiber.StatusBadRequest, "failed to read sheet rows")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user