Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Issue on Exporting the number with 00.00 format
posted

Hi

I am using the infragistic version  11.1.20111.1006 and I am trying to export the WebHierarchicalDataGrid with CSS in Excell . When I export the data the Excell storing the digits in text format . So I want to show them in number format for perticiler column . A code sample is as below ,

ByRef theWorkSheet As Infragistics.Documents.Excel.Worksheet,

theWorkSheet.Rows(iRow).Cells(iCell).Value = cellText .

The cell text may be in the form numbers as text format or Letters . If number comes I have to show in 00.00 format in numeric format  so that I can add them at the last row .

Please help me to resolve this problem 

Parents
  • 44743
    posted

    It sounds like you want to parse the cell value into a number if possible and display it with a "00.00" format. If it cannot be parsed as a number, you want it to display as text. If so, try doing something like this:

    Dim cell = theWorkSheet.Rows(iRow).Cells(iCell)
    Dim doubleValue As Double
    If Double.TryParse(cellText, doubleValue) Then
        cell.Value = doubleValue
        cell.CellFormat.FormatString = "00.00"
    Else
        cell.Value = cellText
    End If

     

Reply Children
No Data