0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【DS】特定のエクセル行を削除して、データは他のファイルに転載する

Last updated at Posted at 2020-01-10

【アルゴリズム】
1.png
2.png

【ポイント】
転載するエクセルを書き込み可能で開く

編集可能なエクセルとして参照元(行を削除するエクセル)を開く

編集しないエクセルを ie as excel で開く
※上記3つのエクセルはグローバルでOK

ループをつかう

参照するだけのエクセルでどの行が削除対象かをイテレーションを取得して特定する

転載先のエクセルをカレントウィンドウで選択しておく

対象となった行の値を転載

編集するエクセルでイテレーションの番号と一致する行を削除する動作をいれる

これで削除できる

ファイルに出力する

※要は参照するエクセルと、行を削除する編集用のエクセルを別々にしておく。

・削除するときは名前をつけて削除する 以下の感じ
3.png
4.png
5.png

【備考】
・以下の感じで一つのエクセルで完結しようとするとエラーが出る
1.png

2.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?