Spreadsheet paste issue when data contain "alt+enter" key

Hi Webix Team,

when I copy data from excel which contain "alt+enter" key and I paste into webix spreadsheet data not displayed properly on spreadsheet.

e.g if we copy data "Recommended inflation pressure" in excel entered with "alt+enter"

How to paste data properly if data conatin "alt+enter" key ?

https://snippet.webix.com/x5z9y8u5

Please reply.

Thank you.

Tagged:

Comments

  • Please reply

  • edited August 26

    Hey @Prarthana, you could try and adjust this via CSS. You can allow the line breaks with the help of white-space property. By changing that, your breaks will be displayed, however, you won't be able to see the cell content unless you adjust the row height to match the new cell height. To do so, use the adjustRowHeight method of the datatable part of the spreadsheet componenet.

    Here is an example of how this would look: https://snippet.webix.com/5pzah4wx. Try importing a file that contains the data with alt+enter line breaks for example. Please note, that trying to edit the data will result in some issues, this method is only acceptable for simply displaying the data.

  • edited August 26

    Actually, if you don't mind using a popup editor, this is probably the best way to handle editiing multiline text - suggest with a textarea editor (popup editor). You can set the cell editor with the help of setCellEditor method: https://snippet.webix.com/wcm42i1n. Please note, that you will need to set it to all of the relevant cells.

  • Hello Team,

    Both solutions are not working when we enter multiline data(enter using 'alt+enter" key) in excel and copy from excel and paste in webix spreadsheet.
    multiline text which is in single excel cell is going to next line in webix spreadsheet.

    Please provide solution for this.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!