隣接していないセルの複数選択をコピーできない
問題
隣接していないセルを複数選択してthink-cellのデータシートにコピーすることができません。Ctrlキーを押してセルをクリックするといった操作で隣接していないセルを複数選択し、このようなセルをコピーしてthink-cellの内部データシートに貼り付けると、その間にある選択されていないセルも貼り付けられます。

- ソース シート:セルA1、A3、A5をコピー→コピー先シート:A1:A5が貼り付けられます
説明
これはExcelの設計の限界です。think-cellの内部データシートはExcelに基づいていますが、別個のExcelプロセスです。この問題は、隣接していないセルをコピーして別個のExcelプロセスに貼り付けると、think-cellなしでも再現できます。
think-cellなしで再現:
- Excelを開き、何らかの数字をセルA1~A5に入力します。
- セルA1、A3、A5を選択します。Ctrlキーを押したまま、これらのセルをクリックしてください(上記のスクリーンショット参照)。選択した項目をコピーします。
- タスク バーのExcel記号を右クリックし、Microsoft Excel 20…をクリックして別個のExcelプロセスを開始します。
- 貼り付けます(例:Ctrl + Vを押します)。
結果:選択されていないセルA2とA4も貼り付けられます。
弊社はこの問題についてMicrosoft Officeサポートに報告しました。(ケース112021442496011) Microsoft Officeサポートは、この動作はこれまで記録されていないが「設計上」そうなっていると回答しています。
“This behavior is by design.
When you use the clipboard for copy and paste, you are using a feature that is designed to work across all office applications. Since this is the case, the clipboard uses HTML code for storing and then pasting data. The HTML code is limited to a range select and you get all the data in the range including the cells you did not select. It is creating a table in HTML code and uses this table for the paste action. This allows the clipboard to share data from Excel to other office applications such as Word, Power Point, and other instances of Excel outside this workbook.
When you use Ctrl-C and then follow it up with Ctrl-V instead of using the clipboard you are using an internal Excel single instance copy feature that allows Excel to copy only the selected cells. This gives you the desired behavior. The clipboard has limits due to the fact that it shares with all office applications. The limit to the clip board was planned due to the huge amount of data that would be required to do a simple copy and paste. Large copy actions would overwhelm the system and cause huge slowdowns in performance. The HTML copy is a stripped down version of the internal copy and therefore there are differences and limits.” (Microsoft Office Support)