0
0

More than 1 year has passed since last update.

エクセルをサクラに貼り付けて、インサートデータの形にするサクラマクロ

Last updated at Posted at 2022-02-15

サクラへの貼り付けは手動だよ

マクロ本文

UTF-8 BOM付で保存してね。

createInsetData.mac
//キーボードマクロのファイル
ReplaceAll('\\t', '\', \'', 38);    // すべて置換
ReDraw(0);  // 再描画
ReplaceAll('^', '\\t(\'', 38);  // すべて置換
ReDraw(0);  // 再描画
ReplaceAll('$', '\'), ', 38);   // すべて置換
ReDraw(0);  // 再描画

実行前後

これが

データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3
データ1  データ2  データ3

こうなる

    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 
    ('データ1', 'データ2', 'データ3'), 

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