Copy & paste from SpreadJS to Excel

Posted by: hector.pascual on 12 February 2021, 12:13 am EST

  • Posted 12 February 2021, 12:13 am EST


    this.formatterHours = new GC.Spread.Formatter.GeneralFormatter('# ### ###', 'de-de');

    I defined a format for the numeric values in our cells.
    When the user copy & paste cells from SpreadJS to Excel the values are taken as Text to Excel including the blank for thousand-separators.

    Is it possible to tell SpreadJS to copy those values still as numeric values? The values are actually numerics otherwise the numeric formatting wouldn't work, so I wonder if I miss some setting here?

    The best way would be if I could set SpreadJS to take only the number value even without formattings?

    Thank you!

    Best regards
  • Marked as Answer

    Replied 14 February 2021, 11:04 pm EST

    Hi Hector,

    It is the expected behavior, when we copy values, formatted values are copied to the clipboard and when pasting to excel, excel parses the number according to the culture set for the MS excel. If the number format for excel is the same as the number copied then excel will recognize the value as the number and paste it as a number value otherwise it will paste as text.

Need extra support?

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

Learn More

Forum Channels