News for hackers. Stuff that matters.
Re:Is there a maximum size for Windows clipboard data? by capableweb on Wednesday June 08, 2022 @10:52AM (#31668213)
> Next time, we’ll see what we can do to extend this timeout.

That, somehow, seems like the wrong conclusion. Why not try to solve the problem of Excel taking longer than 30 seconds to export a RTF table?

Re:Is there a maximum size for Windows clipboard data? by kencausey on Wednesday June 08, 2022 @10:56AM (#31668266)
Given the range of computers on which Excel is likely to be running that seems like a complete non-starter. There will always be cases that take longer than X no matter what you choose for X.
Re:Is there a maximum size for Windows clipboard data? by capableweb on Wednesday June 08, 2022 @11:12AM (#31668527)
Yeah, why not display a "Exporting..." dialog then that the user themselves can cancel if they think it's taking too long? Extending the timeout to X won't solve anything.
Re:Is there a maximum size for Windows clipboard data? by elpocko on Wednesday June 08, 2022 @11:32AM (#31668870)
When you press Ctrl+V, the target window is focused. Forcibly switching back to Excel to show this dialog seems weird and confusing to me.
Re:Is there a maximum size for Windows clipboard data? by glenneroo on Wednesday June 08, 2022 @11:47AM (#31669128)
Then why not show a system dialog similar to copy/move files dialog after e.g. 5 seconds of waiting for a copy-to-clipboard operation?
Re:Is there a maximum size for Windows clipboard data? by hackmiester on Wednesday June 08, 2022 @12:05PM (#31669425)
Actually, now that you point out that this could be done, I’m surprised it wasn’t.
Re:Is there a maximum size for Windows clipboard data? by seritools on Wednesday June 08, 2022 @11:05AM (#31668409)
Cool, now it's optimized and it manages to export up to a million lines in 30 seconds. What do you propose to do when the next customer wants to copy 1.5 million lines?
Re:Is there a maximum size for Windows clipboard data? by hermitdev on Wednesday June 08, 2022 @11:46AM (#31669114)
> What do you propose to do when the next customer wants to copy 1.5 million lines?

Thankfully, that can't happen :). XLSX has a row limit of 1,048,576 rows.

In all seriousness, I don't have an answer for you other than that the developer that's looking to shove >1M excel rows around should find a better solution than the clipboard. I've done more than my fair share of work pushing excel spreadsheets around (and I've even worked on Excel add-ins). There are plenty of performant ways of accessing large volumes of Excel data, none of them involve the clipboard. Most of them even work on non-Windows platforms.

The arbitrary row & column limits in Excel (XLS was pretty small, XLSX is quite a bit bigger, but still arbitrary) are annoying and I cannot begin to tell you how many hours over the years I've wasted due to this limitation or Excel silently truncating large CSV files on import.

Re:Is there a maximum size for Windows clipboard data? by londons_explore on Wednesday June 08, 2022 @03:23PM (#31672681)
Indeed - it would be very possible to make a version of Excel which can deal with infinite-sized sheets by leaving most of the data on disk and only loading a few screenfulls at once.
Re:Is there a maximum size for Windows clipboard data? by eropple on Wednesday June 08, 2022 @07:16PM (#31675699)
"Very possible" reads to me a bit cheat-y, in that you could do so but you probably don't want or need to. Paging a workbook out to disk in this way necessitates keeping a cell-to-cell relational map for everything and then paging it back in when you then need to pointer-chase through a set of updates--well, you've just reinvented virtual memory but worse, haven't you?

Excel is an intensely business-critical product and has a lot of smart folks working on it. There are tradeoffs you're eliding and I'm confident that they know of them.

Re:Is there a maximum size for Windows clipboard data? by londons_explore on Wednesday June 08, 2022 @08:01PM (#31676060)
People said the same about text editors. But there are quite a few text editors that will happily open and edit a 1Tb text file.
Re:Is there a maximum size for Windows clipboard data? by genocidicbunny on Wednesday June 08, 2022 @10:30PM (#31677009)
Editing a text file can be done in such a way that editing/adding/removing lines has no effect on any untouched lines. In an Excel spreadsheet, changing a single cell can result in a cascade of updates all over the place, in a contrived scenario it could result in all other cells being updated.
Re:Is there a maximum size for Windows clipboard data? by eropple on Thursday June 09, 2022 @09:38AM (#31680975)
A text editor is not a relational system with cascading updates.
Re:Is there a maximum size for Windows clipboard data? by passivate on Thursday June 09, 2022 @12:14AM (#31677468)
I don't think its realistic to expect a Windows developer to solve a problem in Excel!