.comment-link {margin-left:.6em;}
Name:
Location: San Diego, California, United States

Tuesday, March 15, 2005

Spreadsheet Cut & Copy

I'm currently writing a spreadsheet, and a couple of weeks ago I got around to implementing Copy & Paste, then Cut.

I was surprised by how different Cut was from Copy; I had thought it would be a simple combination of Copy and Delete. I was wrong; I now understand why Excel's clipboard is so nonstandard, relative to non-spreadsheet applications where Cut is just Copy & Delete.

First off, because it changes the document, Cut should itself be undoable, although Copy isn't. I guess this is also true in non-spreadsheet applications.

Links into the clip region (including both relative and absolute links) from outside are unaffected in a Copy's Paste, but are updated in a Cut's, because it is really a Move operation.

This means, too, that a Cut-Paste is a one-shot deal; when it's done the clipboard is empty, although a Copy-Paste can be repeated ad infinitum.

When pasting a single cell, Copy-Paste allows pasting into multiple cells, but Cut-Paste does not; this is an extension to the one-shot rule.

Relative links from the clip region to outside are altered to fit the new location in the case of Copy-Paste, but left alone for Cut-Paste.

All internal links are updated in a Cut-Paste, but only relative internal links are updated in a Copy-Paste.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home