Merge Static Cells in Grapecity Excel Template

Posted by: muralidhar.m on 12 August 2021, 2:07 am EST

    • Post Options:
    • Link

    Posted 12 August 2021, 2:07 am EST

    Hi team,

    I just wanted to know whether grapecity supports merging of static cells in excel template. For example, PFA of sample expected excel output. Here values are dynamically filled in column B and column A is static. Values in Column B should be filled downwards and static column A should be merged till values in column B ends as shown in the attached excel report. Please let me know whether grapecity supports this static merging by just specifying command in the template itself.

    GrapecitySampleOutput.xlsx.zip

  • Posted 13 August 2021, 6:00 am EST

    Hi,

    You may use the auto-merge feature of spreadJS for the required functionality. Please refer to the following code snippet and let us know if you face any issues.

    
     var range = new GC.Spread.Sheets.Range(0, 0, 5, 1);
        sheet.autoMerge(
          range,
          GC.Spread.Sheets.AutoMerge.AutoMergeDirection.column,
          GC.Spread.Sheets.AutoMerge.AutoMergeMode.free,
          GC.Spread.Sheets.SheetArea.viewport,
          GC.Spread.Sheets.AutoMerge.SelectionMode.merged
        );
    
    

    sample: https://codesandbox.io/s/spread-js-starter-forked-8r06b?file=/src/index.js:1026-1329

    autoMerge Demo: https://www.grapecity.com/spreadjs/demos/features/cells/auto-merge/column-auto-merge/purejs

    Regards

    Avinash

Need extra support?

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

Learn More

Forum Channels