作者 陈志颖

fix:修复导出excel单元格错误问题

@@ -442,17 +442,18 @@ func (controller *SuMoneyController) ExportExchangeList() { @@ -442,17 +442,18 @@ func (controller *SuMoneyController) ExportExchangeList() {
442 columnNum := 0 //列数 442 columnNum := 0 //列数
443 for _, vv := range v { 443 for _, vv := range v {
444 sheetPosition := cells[columnNum] + strconv.Itoa(lineNum+2) 444 sheetPosition := cells[columnNum] + strconv.Itoa(lineNum+2)
445 - switch vv.(type) {  
446 - case string:  
447 - f.SetCellValue("Sheet1", sheetPosition, vv.(string))  
448 - break  
449 - case int:  
450 - f.SetCellValue("Sheet1", sheetPosition, vv.(int))  
451 - break  
452 - case float64:  
453 - f.SetCellValue("Sheet1", sheetPosition, vv.(float64))  
454 - break  
455 - } 445 + f.SetCellValue("Sheet1", sheetPosition, vv.(string)) // 所有字段保存为字符串类型
  446 + //switch vv.(type) {
  447 + //case string:
  448 + // f.SetCellValue("Sheet1", sheetPosition, vv.(string))
  449 + // break
  450 + //case int:
  451 + // f.SetCellValue("Sheet1", sheetPosition, vv.(int))
  452 + // break
  453 + //case float64:
  454 + // f.SetCellValue("Sheet1", sheetPosition, vv.(float64))
  455 + // break
  456 + //}
456 columnNum++ 457 columnNum++
457 } 458 }
458 } 459 }