Board logo

標題: 點解Google Sheets API v4 噤Q stubborn? [打印本頁]

作者: luckiejacky    時間: 2018-2-7 16:05     標題: 點解Google Sheets API v4 噤Q stubborn?

[attach]2040713[/attach]
  1. function writeSpreadSheet(auth)
  2. {
  3.         var values = [
  4.             [
  5.                 'J C',
  6.                 '4567'
  7.           ]
  8.         ];
  9.        
  10.          
  11.         var body = {
  12.            "majorDimension":"ROWS",       
  13.            "values": values
  14.         };
  15.        
  16.         var sheets = google.sheets('v4');
  17.         sheets.spreadsheets.values.append({
  18.           spreadsheetId: 'MY-SPREADSHEET',
  19.           range: 'A1',
  20.           //includeValuesInResponse: false,
  21.           //insertDataOption: 'INSERT_ROWS',
  22.           //responseDateTimeRenderOption: 'SERIAL_NUMBER',
  23.           //responseValueRenderOption: 'FORMATTED_VALUE',
  24.           valueInputOption: 'USER_ENTERED',
  25.           auth: auth,
  26.           key:'MY-KEY',
  27.           resource: body
  28.         }, function(err, result) {
  29.           if(err) {
  30.                 // Handle error.
  31.                 console.log(err);
  32.           } else {
  33.                 console.log('%d cells appended.', result.updates.updatedCells);
  34.           }
  35.         });
  36.        
  37. }
複製代碼

作者: luckiejacky    時間: 2018-2-7 16:56

https://stackoverflow.com/questi ... d-but-not-specified

OMG, bug again....





歡迎光臨 電腦領域 HKEPC Hardware (https://h0.hkepc.com/forum/) Powered by Discuz! 7.2