VBA表标头名称不变

时间:2018-09-09 07:34:59

标签: excel-vba

在带有宏的Excel中,每次单击按钮时,都会将2个新列添加到现有表中,并设置这些列的标题。它适用于第一次添加,但是此后即使更改了列名也无法更改名称。

function doPost(e) {
  var contents = JSON.parse(e.postData.contents);
  var text = contents.message.text;
  var id = contents.message.from.id;
  var keyboard = keyboardValues();
  if (text == "/start"){
    var message = "Choose the name: ";
    var keyboard = JSON.stringify({
    keyboard: [[{text: 'OK'},{text: 'OK'}]],
    one_time_keyboard: true, 
    resize_keyboard: true
    });
    sendText(id, message, keyboard);
  }
}

function sendText (id, text, reply_markup ){
  var url = telegramUrl + "/sendMessage?chat_id=" + id + "&text=" + text + "&reply_markup=" + reply_markup ;
  var response = UrlFetchApp.fetch(url);
}

0 个答案:

没有答案