copying headers

Posted by: edinsf on 8 September 2017, 2:02 pm EST

  • Posted 8 September 2017, 2:02 pm EST

    I'm using the rangecopy method to duplicate a set of columns in the same sheet it works fine except for the headers.  Is there any way to copy the column headers?
  • Replied 8 September 2017, 2:02 pm EST

    Hello,

    I am not sure if this can be done using either the CopyRange or MoveRange method within a sheet. However, in case you have more than one sheet in your spread and want to copy the column header information from Sheet1 to Sheet2, then this can be done as follows:

    <blockquote>

      FpSpread1.Sheets(1).Models.ColumnHeaderData = FpSpread1.Sheets(0).Models.ColumnHeaderData

    </blockquote>

    In case, you want to copy the column header style information (backcolor, forecolor,border etc), then you can use the <b>ColumnHeaderStyleModel </b>

    Hope this helps. Thanks

Need extra support?

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

Learn More

Forum Channels