Error getColumns is not a function

Posted by: reuben.joey.mawthoh on 16 January 2018, 7:45 pm EST

    • Post Options:
    • Link

    Posted 16 January 2018, 7:45 pm EST

    var workbook = new GC.Spread.Sheets.Workbook(document.getElementById(“editor”));

    workbook.getActiveSheet().getColumns(1, 4)

    But i keep getting the following error:-

    Uncaught TypeError: workbook.getActiveSheet(…).getColumns is not a function.

  • Posted 16 January 2018, 11:04 pm EST

    I realised that for SpreadJs v11 we have to use

    workbook.getActiveSheet().getRange function

  • Posted 17 January 2018, 10:34 pm EST

    Hello,

    That is correct, you need to use getRange() to get columns. The cellRange. If row is -1 and rowCount is -1, the range represents columns. For example, sheet.getRange(-1,4,-1,6) returns the columns “E:J”.

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels