回复 3楼LeeDongmei的帖子
通过以下代码我可以正常获取小数,请你尝试下:
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- If IsPostBack Then
- Return
- End If
- Dim dt As New DataTable()
- dt.Columns.Add("小数", GetType(System.Double))
- dt.Rows.Add(1.3254)
- dt.Rows.Add(1.3254)
- dt.Rows.Add(1.3254)
- dt.Rows.Add(1.3254)
- FpSpread1.Sheets(0).DataAutoCellTypes = False
- FpSpread1.DataSource = dt
- Dim dct As New DoubleCellType()
- dct.DecimalDigits = 4
- FpSpread1.Sheets(0).Columns(0).CellType = dct
- Me.Response.Write(FpSpread1.Sheets(0).Cells(0, 0).Text)
- Me.Response.Write(FpSpread1.Sheets(0).Cells(0, 0).Value.ToString())
- End Sub
复制代码
或者把您的 Demo 发上来查看重现问题。
谢谢 |