Copy Paste From Excel

Posted by: koustubh on 8 September 2017, 2:00 pm EST

  • Posted 8 September 2017, 2:00 pm EST

    I am using spread control for dot net 2.0

    I am copying data from excel and paste it in to spread control but I am facing problem for data consistancy. When I Copy 400 rows and 8 columns data and paste on spread it is working properly. But when I copy 1800 rows and 20 columns my row data at some rows shifted up by one row.

    The excel is same which I export from spread control using saveexcel method. Why this is happening?

  • Replied 8 September 2017, 2:00 pm EST


    I am not able to reproduce this issue. Could you post a small zipped project reproducing this behavior for us to debug?

  • Replied 8 September 2017, 2:00 pm EST


    1 Case :    I have one more question. During run time I am setting a cell type as number cell type and populating formula in it eg. =10+20.

    same spread also contains textcell. When user copy data from textcell and paste it on number cell type. number cell type get

    overright with text cell and user can enter text in it which I dont want on this spread. What more setting I need to do to avoid this probelm.

    I dont want to disable copy paste on spread.(means I can copy/paste numbers in number cell type.)

    2 Case: When I set cell type as number and if I add user formula as =10+0.000006 it gives me result as = 10+6E-06 what I need to do get it as 10.000006.

    here my cell type is numeric and decimal digit property as 4.


  • Replied 8 September 2017, 2:00 pm EST


    1 Case: I am not able to replicate the issue with the latest build of Spread v4 for Windows Forms. I copied the text from a Text cell and tried to paste it into a number cell , it doesn't allow the text to be pasted.

    2.With the same build of Spread setting the DecimalPlaces=6 , I am able to get the desired result.Please have a look at the code that I used to set the CellType.I have alos attached an Image for the same.

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim edit As New FarPoint.Win.Spread.CellType.TextCellType
            FpSpread1.Sheets(0).Columns(0).CellType = edit
            Dim num As New FarPoint.Win.Spread.CellType.NumberCellType
            num.DecimalPlaces = 6
            FpSpread1.Sheets(0).Columns(1).CellType = num
            FpSpread1.Sheets(0).Cells(3, 1).Formula = "10+0.000006"
        End Sub





Need extra support?

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

Learn More

Forum Channels