Hi,
I need some advice on the following:
1. Copy Excel 2D range to the clipboard
2. Paste clipboard data into the datagridview in same layout as Excel
3. Populate an array of objects with this data, where each row is sent to one object, with the value in each column/cell as a member of the object class.
Example:
Public Class Point
Public X as Integer
Public Y as Integer
End Class
Grid would look like:
X1 Y1
X2 Y2
X3 Y3
Number of columns will be fixed, however rows will vary. Would anyone have some code snippets that could help me forward with this?
I guess I can get the clipboard content as a string, and then split it up, but are there more clever ways to go about this?
Also, some excel cells may be empty.. still it must keep its location..
I need some advice on the following:
1. Copy Excel 2D range to the clipboard
2. Paste clipboard data into the datagridview in same layout as Excel
3. Populate an array of objects with this data, where each row is sent to one object, with the value in each column/cell as a member of the object class.
Example:
Public Class Point
Public X as Integer
Public Y as Integer
End Class
Grid would look like:
X1 Y1
X2 Y2
X3 Y3
Number of columns will be fixed, however rows will vary. Would anyone have some code snippets that could help me forward with this?
I guess I can get the clipboard content as a string, and then split it up, but are there more clever ways to go about this?
Also, some excel cells may be empty.. still it must keep its location..