[{"id":"924e5c0c-0717-4fae-9bbc-0b496941985e","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"22646924-f1ae-4a94-ac8e-e3e8ea2931f2","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"827318c4-10fd-462b-aa96-fab2cff174a9","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"8f626f70-8570-4934-a0e5-fc0ca6584738","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"1029bbcc-399c-42e6-b412-a0437395d2d5","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7e6097ce-e53b-416c-89c8-a3708db50528","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"3d1b1e48-357c-4999-985c-d9422356690a","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"e6cb5248-c20b-4d3e-adaf-b5c547e29548","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"58695f0f-7cb8-4bad-b617-dda90b01f606","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"081f453a-0e9a-4f06-a70b-18085a1f0d81","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"2c1d8bf8-2b69-4b16-bac9-9c46901abb6a","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"a042f416-d318-415c-b294-ed88a5010572","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7a454c88-860a-4e28-b52c-b18bae07dfe8","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"63b1ec03-c852-40ec-860e-f025c5791091","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"6b7d135b-71b4-4af7-828c-b28bf70b8ec7","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"5937193e-fd56-4296-8e32-ba41dba8e564","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"8ed468db-93ce-4cb3-8e2b-3249d9d464a7","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"4169f34f-3e9b-45c1-91bf-41c02c3ad5a4","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"411aa66d-8df8-4466-896a-d8de68cf7066","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7fc8dcfc-27ff-4496-96c2-d92dfe1fb4b2","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"02afd225-87f7-4f6d-8be1-0a303c8beade","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"8040235f-6c53-447e-a7f0-4fe5911e066b","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"0610b0d6-03c7-461b-9dd4-f8d1b1787e7c","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"7919ac2f-121b-447c-82ed-15d13b45df0b","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"1d01b943-eac8-480b-8d85-19bd093c8b3d","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"1f4d1309-e22c-413f-848d-2c0ca8450b0e","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"66d78fb1-e833-4bbf-ac7c-6bdfce9a80b0","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"ed5ad6f1-f5a2-47b8-a915-b185e8471ca3","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"6e9decb7-47f3-4871-81b9-65504bc293f1","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"836dcc3b-2afe-4351-bf9f-bd9e2b0c8510","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"80633614-e86b-4b0b-9129-9f7acab69f6d","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"1aaae15a-3496-43eb-a681-b077034832e4","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"70ce0595-eb94-4eb3-84f6-3a89ab8a4409","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f3e379ff-ca52-44d8-a15e-966f89904220","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"c1228456-1b5c-429d-b231-25c10a2b41cc","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"58e7444a-12e4-4161-81db-0bb54d09eca9","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"f70c6c85-addd-43e7-8e2b-69dfe4a0a2fd","tags":[{"product":null,"links":null,"id":"6c1a6899-1b88-404c-9a73-4a0c6c9090a3","name":"New","color":"Red","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]},{"id":"de70365b-d7c6-4355-a59b-3e77a6a374ae","tags":[{"product":null,"links":null,"id":"2f522515-8c88-4017-855d-905bc4b0ea3c","name":"Upd","color":"Blue","productId":"66a69675-7df9-45b2-867a-4ab2613535fa"}]}]
        
(Showing Draft Content)

ダブルクリックでオートフィル

Spread.Sheetsを使用すると、ユーザーはワークシートの列にデータ(数式および値)を自動的に入力できます。ユーザーは、選択したセルのフィルハンドルをダブルクリックするだけで、セルの内容を列全体に入力することができます。フィルハンドルは、4つのオプションを使用してデータを入力することができます(セルのコピー、連続データ、書式のみコピー、書式なしコピー)。

ビジネスアプリケーションでは、数百行または数千行のデータを含むワークシートを場合があります。ダブルクリックでオートフィルを行うと、マウスを使用して手動でドラッグ入力しなくてもすばやく簡単に自動入力でき、エンドユーザーの時間を節約するとともに、入力ミスを減らすことができます。

ダブルクリックでオートフィル操作

フィルハンドルをダブルクリックすると、startRangeの内容(すでにデータが含まれているセル範囲)に応じて、列の下の空のセル(fillRangeと呼ばれます)がフィルされます。

以下、ダブルクリックでオートフィルできる操作について説明します。

  • 数値 :startRangeに数値が含まれる場合、フィルハンドルは、以下に示すように、数値を自動入力します。数値列は、対応するパターン、およびフィルハンドルのオプションに基づいてフィルされます。

    number-gif


  • 日付 :startRangeに日付値が含まれる場合、フィルハンドルは、以下に示すように、日付を自動入力します。デフォルトの動作は、「セルのコピー」アクションを実行します。連続した日付でフィルする場合は、ドラッグフィルのスマートタグを開いて、「連続データ」オプションを選択してください。

    date-gif


  • 数式 :startRangeに式が含まれる場合、フィルハンドルは、以下に示すように、式を自動入力します。

    formula-gif

:以下は、制限事項となります。

  1. オートフィルは、フィルハンドルの隣の列に空でないセルがある場合にのみ動作します。

  2. 列のデータをフィルするためにフィルハンドルをダブルクリックすると、現在の列の最後の空でないセルまでしかフィルされません。

  3. また、隣接する列に空のセルが含まれている場合は、フィルハンドルをダブルクリックすると、隣接する列の最後の空でないセルまでフィルされます。

コードの使用

ダブルクリックして値や数式をオートフィルするには、以下のサンプルコードを参照してください。

// 数値および数式をオートフィルする
var spread = new GC.Spread.Sheets.Workbook(document.getElementById('ss'), {
  sheetCount: 4
});
var sheet = spread.getActiveSheet();
// デフォルトのワークシートに値を設定します
sheet.setValue(0, 0, 'Name');
sheet.setValue(1, 0, 'Jack');
sheet.setValue(2, 0, 'Lily');
sheet.setValue(3, 0, 'Linda');
sheet.setValue(4, 0, 'John');
sheet.setValue(5, 0, 'Bob');
sheet.setValue(6, 0, 'Ming');
sheet.setValue(7, 0, 'Gorge');
sheet.setValue(8, 0, 'Kobe');
sheet.setValue(9, 0, 'James');
sheet.setValue(10, 0, 'Faker');
sheet.setValue(11, 0, 'Tai');
sheet.setValue(12, 0, 'Peter');
sheet.setValue(0, 1, 'Index');
sheet.setValue(1, 1, 1);
sheet.setValue(2, 1, 2);
var sheet1 = spread.getSheet(1);
// "sheet1"ワークシートに値を設定します
sheet1.setValue(0, 0, 'Product');
sheet1.setValue(1, 0, 'P1');
sheet1.setValue(2, 0, 'P2');
sheet1.setValue(3, 0, 'P3');
sheet1.setValue(4, 0, 'P4');
sheet1.setValue(5, 0, 'P5');
sheet1.setValue(6, 0, 'P6');
sheet1.setValue(7, 0, 'P7');
sheet1.setValue(8, 0, 'P8');
sheet1.setValue(9, 0, 'P9');
sheet1.setValue(10, 0, 'P10');
sheet1.setValue(11, 0, 'P11');
sheet1.setValue(12, 0, 'P12');
sheet1.setValue(0, 1, 'Price');
sheet1.setValue(1, 1, 1.1);
sheet1.setValue(2, 1, 1.5);
sheet1.setValue(3, 1, 1.6);
sheet1.setValue(4, 1, 1.2);
sheet1.setValue(5, 1, 1.5);
sheet1.setValue(6, 1, 0.8);
sheet1.setValue(7, 1, 0.8);
sheet1.setValue(8, 1, 1.0);
sheet1.setValue(9, 1, 2.2);
sheet1.setValue(10, 1, 2.0);
sheet1.setValue(11, 1, 0.7);
sheet1.setValue(12, 1, 1.5);
sheet1.setValue(0, 2, 'Units');
sheet1.setValue(1, 2, 11);
sheet1.setValue(2, 2, 13);
sheet1.setValue(3, 2, 10);
sheet1.setValue(4, 2, 9);
sheet1.setValue(5, 2, 8);
sheet1.setValue(6, 2, 5);
sheet1.setValue(7, 2, 10);
sheet1.setValue(8, 2, 16);
sheet1.setValue(9, 2, 9);
sheet1.setValue(10, 2, 7);
sheet1.setValue(11, 2, 10);
sheet1.setValue(12, 2, 14);
sheet1.setValue(0, 3, 'Comment');
sheet1.setValue(0, 4, 'Revenue');
sheet1.setFormula(1, 4, '=B2*C2');
var sheet2 = spread.getSheet(2);
// "sheet2"ワークシートに値を設定します
sheet2.setValue(0, 0, 'Product');
sheet2.setValue(1, 0, 'P1');
sheet2.setValue(2, 0, 'P2');
sheet2.setValue(3, 0, 'P3');
sheet2.setValue(4, 0, 'P4');
sheet2.setValue(5, 0, 'P5');
sheet2.setValue(6, 0, 'P6');
sheet2.setValue(7, 0, 'P7');
sheet2.setValue(8, 0, 'P8');
sheet2.setValue(9, 0, 'P9');
sheet2.setValue(10, 0, 'P10');
sheet2.setValue(11, 0, 'P11');
sheet2.setValue(12, 0, 'P12');
sheet2.setValue(0, 1, 'Price');
sheet2.setValue(1, 1, 1.1);
sheet2.setValue(2, 1, 1.5);
sheet2.setValue(3, 1, 1.6);
sheet2.setValue(4, 1, 1.2);
sheet2.setValue(5, 1, 1.5);
sheet2.setValue(6, 1, 0.8);
sheet2.setValue(7, 1, 0.8);
sheet2.setValue(8, 1, 1.0);
sheet2.setValue(9, 1, 2.2);
sheet2.setValue(10, 1, 2.0);
sheet2.setValue(11, 1, 0.7);
sheet2.setValue(12, 1, 1.5);
sheet2.setValue(0, 2, 'Units');
sheet2.setValue(1, 2, 11);
sheet2.setValue(2, 2, 13);
sheet2.setValue(3, 2, 10);
sheet2.setValue(4, 2, 9);
sheet2.setValue(5, 2, 8);
sheet2.setValue(6, 2, 5);
sheet2.setValue(7, 2, 10);
sheet2.setValue(8, 2, 16);
sheet2.setValue(9, 2, 9);
sheet2.setValue(10, 2, 7);
sheet2.setValue(11, 2, 10);
sheet2.setValue(12, 2, 14);
sheet2.setValue(0, 3, 'Comment');
sheet2.setValue(0, 4, 'Revenue');
sheet2.setValue(7, 4, 'STOP');
sheet2.setFormula(1, 4, '=B2*C2');
var sheet3 = spread.getSheet(3);
// "sheet3"ワークシートに値を設定します
sheet3.setValue(0, 4, 'Product');
sheet3.setValue(1, 4, 'P1');
sheet3.setValue(2, 4, 'P2');
sheet3.setValue(3, 4, 'P3');
sheet3.setValue(4, 4, 'P4');
sheet3.setValue(5, 4, 'P5');
sheet3.setValue(6, 4, 'P6');
sheet3.setValue(7, 4, 'P7');
sheet3.setValue(8, 4, 'P8');
sheet3.setValue(9, 4, 'P9');
sheet3.setValue(10, 4, 'P10');
sheet3.setValue(11, 4, 'P11');
sheet3.setValue(12, 4, 'P12');
sheet3.setValue(0, 3, 'Price');
sheet3.setValue(1, 3, 1.1);
sheet3.setValue(2, 3, 1.5);
sheet3.setValue(3, 3, 1.6);
sheet3.setValue(4, 3, 1.2);
sheet3.setValue(5, 3, 1.5);
sheet3.setValue(6, 3, 0.8);
sheet3.setValue(7, 3, 0.8);
sheet3.setValue(8, 3, 1.0);
sheet3.setValue(9, 3, 2.2);
sheet3.setValue(10, 3, 2.0);
sheet3.setValue(11, 3, 0.7);
sheet3.setValue(12, 3, 1.5);
sheet3.setValue(0, 2, 'Units');
sheet3.setValue(1, 2, 11);
sheet3.setValue(2, 2, 13);
sheet3.setValue(3, 2, 10);
sheet3.setValue(4, 2, 9);
sheet3.setValue(5, 2, 8);
sheet3.setValue(6, 2, 5);
sheet3.setValue(7, 2, 10);
sheet3.setValue(8, 2, 16);
sheet3.setValue(9, 2, 9);
sheet3.setValue(10, 2, 7);
sheet3.setValue(11, 2, 10);
sheet3.setValue(12, 2, 14);
sheet3.setValue(0, 1, 'Comment');
sheet3.setValue(0, 0, 'Revenue');
sheet3.setFormula(1, 0, '=C2*D2');