• Numeric data in columns

    By Olli Kämäräinen 1 decade ago

    Excel export makes all cells and columns to text. Is there any way to make some columns numeric so we could do calculations?

    • Solved

      By Olli Kämäräinen 1 decade ago

      I found two-click solution to this. You can change column data to numeric by clicking in Excel:

      Data –> Text to Columns.. –> Finish

      • How to have automaticaly Numeric Values in Excel

        By Jonathan Cornaz 1 decade ago

        Hi,



        Just for answer i found one way to have automaticaly numerics values in excel reports :



        Change the method "SetCett( Integer, Integer, String)" of MSExcel class from MSOffice-Excel Library like that :







        'Set value of a cell

        Sub setCell(p_intRow As Integer, p_intCol As Integer, strValue As String)

        If IsNumeric( strValue ) Then<br/>
            h_Worksheet.Cells(p_intRow + 1, p_intCol + 1).Value = CDbl( strValue )<br/>
        Else<br/>
            h_Worksheet.Cells(p_intRow + 1, p_intCol + 1).Value = strValue<br/>
        End If<br/>
        

        End Sub







        Regards

        • Well done!

          By David Jeyachandran 1 decade ago

          Good solution. You check if it's numeric and then write it as a number.

           

          David