Need row numbers in RowHeader to start with 0 and also ColumnHeaders to be numeric starting with 0

Posted by: j2associates on 8 September 2017, 1:22 pm EST

  • Posted 8 September 2017, 1:22 pm EST

    Hello all,


    How do I set the row headers so that they are zero based instead of ones based numbers. Also, I would like the column headers to also display from 0 to N instead of A, B, C, D, etc. Thanks in advance for any ideas and/or suggestions!


     

  • Replied 8 September 2017, 1:22 pm EST

    j2 -

    You will need to set the following and then loop through the columns/rows and set the label for each, incrementing by 1 as you go...

    FpSpread1.ActiveSheet.ColumnHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Blank

    FpSpread1.ActiveSheet.RowHeaderAutoText = FarPoint.Win.Spread.HeaderAutoText.Blank
     

  • Replied 8 September 2017, 1:22 pm EST

    Thanks BobM!
  • Replied 8 September 2017, 1:22 pm EST

    j2associates,


    There is an easier way that what Bobm suggested.


    Use the StartingRowNUmber and StartingColumnNumber properties to starting numbering at zero...


        fpSpread1.Sheets[0].StartingRowNumber = 0;
        fpSpread1.Sheets[0].StartingColumnNumber = 0;


    Use the ColumnHeaderAutoText to display numbers in column header...


        fpSpread1.Sheets[0].ColumnHeaderAutoText = HeaderAutoText.Numbers;

  • Replied 8 September 2017, 1:22 pm EST

    Thank you, BobbyO!

Need extra support?

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

Learn More

Forum Channels