If you want to copy and paste data in Windows, the Windows clipboard makes the task quick and simple (Ctrl+C followed by Ctrl+V), but sometimes it doesn't work and Microsoft has now explained why.
In his developer blog(Opens in a new window), Microsoft's Raymond Chen recounts how a customer wanted to copy over 300,000 rows of an Excel spreadsheet using the Windows clipboard, but attempting to access the data after copying it failed and returned NULL instead (meaning having no value). You may think this is due to the sheer size of the data copied, but Chen explains size isn't the problem. In fact, the size of the data you can copy to the clipboard is only limited by how much available memory and address space there is on your desktop PC or laptop.
Instead, this comes down to a quirk of how the data is made available on the clipboard by Windows. The data can either be transferred directly to the clipboard or "clipboard delay-rendering" is used.
Chen explains: "Instead of putting the data on the clipboard, you say, 'If anybody asks, let me know, and I’ll produce the data.' This is known as clipboard delay-rendering, and it is a common optimization for data formats that are rarely used or expensive to produce."
When data stored using the clipboard delay-rendering technique is requested, Windows allows 30 seconds for that data to be returned in the correct format. If it isn't, the request is abandoned and the action returns a NULL value instead.
This is what's happening with the customer's attempted Excel spreadsheet rows copy. The user was requesting the data in a Rich Text Format (RTF), which Excel doesn't use natively, so it has to convert those 300,000 rows to an RTF format before the copy-paste can occur. The
Read more on pcmag.com