Copy & Paste from SpreadJS TableSheet to Excel Worksheet Adds Two Empty Columns

Posted by: ichioka.yuji on 3 August 2026, 9:00 am EST

    • Post Options:
    • Link

    Posted 3 August 2026, 9:00 am EST - Updated 3 August 2026, 9:05 am EST

    Hi,

    When I select the entire SpreadJS TableSheet by clicking the corner header and copy the content with Ctrl+C, then paste it into an Excel worksheet, Excel always includes two empty columns (Column A and Column B).

    Is there any way to exclude these empty columns when copying to the clipboard?

    Below is the TableSheet sample and the result after pasting its content into an Excel worksheet:

    https://developer.mescius.com/spreadjs/demos/features/table-sheet/overview/purejs


    Additionally, even when I try to exclude column headers by specifying

    CopyPasteHeaderOptions.noHeaders
    , it does not seem to work.

    Is there any workaround for this?

    spread.options.copyPasteHeaderOptions = GC.Spread.Sheets.CopyPasteHeaderOptions.noHeaders;
    

    References:

    https://developer.mescius.com/spreadjs/api/interfaces/GC.Spread.Sheets.IWorkbookOptions#copypasteheaderoptions

    https://developer.mescius.com/spreadjs/api/enums/GC.Spread.Sheets.CopyPasteHeaderOptions#noheaders

  • Posted 4 August 2026, 2:58 am EST - Updated 4 August 2026, 3:33 am EST

    Hi,

    Thank you for providing the requested information.

    We were able to reproduce the behavior on our end. However, after setting:

    spread.options.copyPasteHeaderOptions = GC.Spread.Sheets.CopyPasteHeaderOptions.noHeaders;

    the two empty columns are no longer included during the copy/paste operation, and the behavior is as expected. Please refer to the attached GIF.

    If

    CopyPasteHeaderOptions.noHeaders
    is not working as expected on your end, could you please provide a minimal working sample along with the steps to reproduce the issue? This will help us investigate the issue more thoroughly.

    Additionally, it would be helpful if you could provide a GIF or video demonstrating the behavior you are observing.

    Regards,

    Priyam

  • Posted 5 August 2026, 10:06 am EST

    Hi Priyam,

    After reading your response, I realized that I had mistakenly set GC.Spread.Sheets.CopyPasteHeaderOptions.noHeaders on the wrong member of IWorkbookOptions. I corrected this and confirmed that it now works properly.

    Thank you as always for your excellent support!

  • Posted 6 August 2026, 2:37 am EST

    Hi,

    Thank you for the update.

    I’m glad to hear you were able to identify the issue and that correcting the GC.Spread.Sheets.CopyPasteHeaderOptions.noHeaders setting resolved the problem.

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels