回答編集履歴

5

2019/07/31 10:11

投稿

papinianus
papinianus

スコア12705

test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  Object.keys(dat).forEach(function (r) {
30
30
 
31
- SpreadsheetApp.create(r).getSheets()[0].getRane(1, 1, dat[r].length, dat[r][0].length).setValues(dat);
31
+ SpreadsheetApp.create(r).getSheets()[0].getRange(1, 1, dat[r].length, dat[r][0].length).setValues(dat);
32
32
 
33
33
  });
34
34
 

4

2019/07/31 10:11

投稿

papinianus
papinianus

スコア12705

test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  }, {});
28
28
 
29
- Object.keys(dat).forEach(function (k) {
29
+ Object.keys(dat).forEach(function (r) {
30
30
 
31
31
  SpreadsheetApp.create(r).getSheets()[0].getRane(1, 1, dat[r].length, dat[r][0].length).setValues(dat);
32
32
 

3

2019/07/23 10:12

投稿

papinianus
papinianus

スコア12705

test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  const dat = fileIds.map(function(f){ return Utilities.parseCsv(DriveApp.getFileById(f).getBlob().getDataAsString(), delimiter);}).reduce(function (a, c) { return a.concat(c);}).reduce(function (acc, r) {
14
14
 
15
- if(acc[r[0]]) {
15
+ if(!acc[r[0]]) {
16
16
 
17
17
  acc[r[0]] = [r];
18
18
 

2

2019/07/19 10:24

投稿

papinianus
papinianus

スコア12705

test CHANGED
@@ -10,9 +10,7 @@
10
10
 
11
11
  const delimiter = ",";
12
12
 
13
- const folder = DriveApp.getRootFolder();
14
-
15
- const dat = fileIds.map(function(f){ return Utilities.parseCsv(folder.getFileById(f).getBlob().getDataAsString(), delimiter);}).reduce(function (a, c) { return a.concat(c);}).reduce(function (acc, r) {
13
+ const dat = fileIds.map(function(f){ return Utilities.parseCsv(DriveApp.getFileById(f).getBlob().getDataAsString(), delimiter);}).reduce(function (a, c) { return a.concat(c);}).reduce(function (acc, r) {
16
14
 
17
15
  if(acc[r[0]]) {
18
16
 

1

2019/07/18 03:01

投稿

papinianus
papinianus

スコア12705

test CHANGED
@@ -4,15 +4,13 @@
4
4
 
5
5
  // せっていせなあかんやつ
6
6
 
7
- const folderId = "";
7
+ const fileIds = ["", ""];
8
8
 
9
- const fileIds = ["", "", ""];
9
+ //さわらんでええやつ
10
10
 
11
11
  const delimiter = ",";
12
12
 
13
- // さわるな
14
-
15
- const folder = DriveApp.getFolderById(folderId);
13
+ const folder = DriveApp.getRootFolder();
16
14
 
17
15
  const dat = fileIds.map(function(f){ return Utilities.parseCsv(folder.getFileById(f).getBlob().getDataAsString(), delimiter);}).reduce(function (a, c) { return a.concat(c);}).reduce(function (acc, r) {
18
16