Copy or Move a column

Posted by: cgupta on 26 July 2019, 2:11 pm EST

    • Post Options:
    • Link

    Posted 26 July 2019, 2:11 pm EST

    How can we move or copy(copy would be like copy the column to the required position and delete the original ) a column from position to other programmatic, so that all the data validation are also copied along.

    eg.

    Column1 Column2 Column3 Column4

    after move/copy it would look like

    Column1 Column3 Column2 Column4

    Any suggestion?

  • Posted 26 July 2019, 2:13 pm EST

    If this is not possible, is there a way to apply data validation and formatting from original column to a newly inserted column?

  • Posted 29 July 2019, 5:21 am EST

    Hi,

    You may use the moveTo() method of Worksheet to move a column’s formatting, validators, and values to another column. Please refer to the following sample which demonstrates the same:

    https://codesandbox.io/s/spread-js-starter-39vg5

    API reference: http://help.grapecity.com/spread/SpreadSheets12/webframe.html#SpreadJS~GC.Spread.Sheets.Worksheet~moveTo.html

    Regards

Need extra support?

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

Learn More

Forum Channels