Home Forums WinForms controls Xceed Grid for WinForms Import from excel

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17105 |

    Is there a convenient way to dump data from an Excel spreadsheet into an Xceed grid? This is something that a lot of the other grids, ComponentOne for example, seem to support.

    Best,

    Aaron Haspel

    Imported from legacy forums. Posted by Aaron (had 1616 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi!

    Unfortunately, there is no easy way to do this.  You can *perhaps* get some inspiration from Jenny who did the exact same task (Copying from Excel, pasting in the WPF Grid) but it was done for the Xceed Datagrid for WPF, not the Xceed Grid for .NET.  But if you don’t have any experience with WPF, this won’t help you.

    http://xceed.com/CS/files/folders/jenny/entry11762.aspx

    If you want to do it from scratch, it can be done but it’s nothing trivial.  You would have to parse the content of the clipboard, add columns and rows, as you are parsing.  Each situation is pretty unique.  For example, is the target grid already having columns with the right types for what you want to paste?  Do they have the same number of fields per record/row?  Or are you starting from a grid with no column?  It’s an interesting challenge, for sure.  Good luck!

     

    Imported from legacy forums. Posted by Ghislain (had 1877 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.