正在显示
1 个修改的文件
包含
12 行增加
和
11 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论