Copy/Paste multiline text pastes into multiple rows instead of single cell

Posted by: gcresse on 28 November 2017, 12:03 pm EST

    • Post Options:
    • Link

    Posted 28 November 2017, 12:03 pm EST

    When I copy from a cell that has multiline text then try to paste it into a new cell, each line is pasted into a separate row on the spread. How can I get it to paste into a single cell? I’m using vb.net and spread version 5.0.2003.

  • Posted 28 November 2017, 5:57 pm EST

    Hello,

    You would need to set the Multiline property to true for the cell where you are pasting the data.

    
    FarPoint.Win.Spread.CellType.TextCellType txt = new FarPoint.Win.Spread.CellType.TextCellType();
    txt.Multiline = true;
    fpSpread1.Sheets[0].Cells[0, 0].CellType = txt;
    
    

    You can paste a multiline text in this cell to appear in one cell only.

    Thanks,

    Deepak Sharma

  • Posted 29 November 2017, 3:08 am EST

    Thanks Deepak. The cell I’m pasting into is also a multiline cell. If I just click in the first cell without highlighting text then paste into a new cell, it works fine. If I select the text, say I only want to copy/paste the first 3 lines of a cell that has 5 lines of data, when I paste into a new multiline cell, it splits the lines into multiple rows. Any way around this?

  • Posted 29 November 2017, 6:28 pm EST

    Hello,

    This is the design behavior. Data with newline is pasted into multiple rows. This behavior is also shown with Microsoft Excel.

    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