data formating in the spread sheet

Posted by: amulya on 8 September 2017, 3:06 pm EST

  • Posted 8 September 2017, 3:06 pm EST

    I have data in the SQL database as shown below


    1


    2


    3


    4


    5


    When I show these data in the spread sheet it shows as it is


    1


    2


    3


    4


    5


    I want that these datas should be shown in the spread sheet as shown below


    001


    002


    003


    004


    005


    pls help me how can I achieve this

  • Replied 8 September 2017, 3:06 pm EST

     


    Hi


    Set the Column celltype is General


    GeneralCellType1.FormatString = "000"


    I Hope it Helps. If I miss something tell me


    Thanks


     

  • Replied 8 September 2017, 3:06 pm EST

    Hello,

    You can do it this way:-

                FarPoint.Win.Spread.CellType.GeneralCellType cell = new FarPoint.Win.Spread.CellType.GeneralCellType();
                cell.FormatString = "000";
                fpSpread3.ActiveSheet.Columns[0].CellType = cell;
                this.fpSpread3.ActiveSheet.Cells[0, 0].Value = 1;
                this.fpSpread3.ActiveSheet.Cells[1, 0].Value = 2;

    Hope it helps.

    Thanks,

    Reeva

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels