Browse Source

Adjust the format of the exported execl cells to numerical values

cxs 5 days ago
parent
commit
dc91230644

+ 8 - 2
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -1506,8 +1506,14 @@ namespace OTSIncAReportGrids
                         else
                         {
                             //非图像列
-
-                            cell.SetCellValue(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString());
+                            double dval = 0;
+                            if(double.TryParse(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString(), out dval))
+                            {
+                                cell.SetCellType(CellType.Numeric);
+                                cell.SetCellValue(dval);
+                            }
+                            else
+                                cell.SetCellValue(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString());
                         }
 
                     }