私のアプリケーションでは、スプレッドシートギアを使用して Excel ファイルを操作しています。次のコードを使用します。
//move incorrect to aux
incorrectLine.Select(); //select the line to be moved
wbkView.Cut();
auxLine.Select();
wbkView.Paste();
//move correct to incorrect
correctLine.Select(); //select the line to be moved
wbkView.Cut();
incorrectLine.Select();
wbkView.Paste();
//move aux to correct
auxLine.Select(); //select the line to be moved
wbkView.Cut();
correctLine.Select();
wbkView.Paste();
ときどき次のエラーが表示されます。
Requested Clipboard operation did not succeed.
StrackTrace を使用:
at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
とErrorCode = -2147221040
私が理解していることから、クリップボードが他のプロセスで使用されている場合に問題があるため、クリップボードを使用せずにExcelファイルから2行を切り替える別のモードが存在するかどうかを知りたい.