I develop an application which should paste some values from spreadsheet applications (like Excel, Numbers etc) to a grid.
The application works perfect except when copy-pasting from Numbers.
Pasting from Libre Office or Google Spreadsheet works with no problem.
Here is my code which I use to get data from Clipboard:
Code: Select all
Now, suppose that I have in Numbers a simple 2x2 table containing values:
When I paste them to my program I get the following string in wx_copied_data variable: L"\n100\n200\n300\n400\n\n"
As you can see there is no tab (\t) between values on the same row. Because of that it is impossible to know if the values are on the same row or on different rows.
If I paste from Libre Office I get the following value in wx_copied_data variable: L"100\t200\n300\t400\n"
which is perfect to parse (I have tab between values on the same row and new line between rows).
Any ideas how to properly handle pasting from Numbers?