Paste from Excel

Jan 17, 2014 at 5:20 PM
Hi!

I'm trying to paste data from excel to the grid but nothing happens. How do you accomplish this?

/Måns
Coordinator
Jan 17, 2014 at 5:29 PM

Please send me demo project.
And can you paste it in notepad?

Coordinator
Jan 17, 2014 at 6:51 PM
Make sure AllowUserToCopy is set to true as well
Jan 17, 2014 at 7:06 PM
I can't even get the sample application, WpfControlKit.exe, to paste data from Excel. Notepad works just fine.
Jan 17, 2014 at 9:06 PM
For some reason the data from Excel gets semi colon separated instead of comma separated and that's why it's not working. Regional settings issue_
Jan 17, 2014 at 9:28 PM
Found it. You need to use System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator instead of always expecting CSV.
Jan 17, 2014 at 9:30 PM
You also need to change "j < maxColumnDisplayIndex" to "j <= maxColumnDisplayIndex" in CopyDataGrid.cs otherwise the last column will be ignored.
Coordinator
Jan 18, 2014 at 4:53 AM
Thanks, working on it.
Coordinator
Jan 18, 2014 at 5:37 AM
Please try latest code and let me know if it working for you.