Как получить текст из редактируемого содержимого div с помощью c #

function onEdit(e) {
  //Logger.log(JSON.stringify(e)); 
  //{"source":{},"range":{"rowStart":1,"rowEnd":1,"columnEnd":1,"columnStart":1},"value":"1","user":{"email":"","nickname":""},"authMode":{}}
  try {
    var ss = e.source; // Just pull the spreadsheet object from the one already being passed to onEdit
    var s = ss.getActiveSheet();

    // Conditions are by sheet and a single cell in a certain column
    if (s.getName() == 'Sheet1' &&  // change to your own 
        e.range.columnStart == 3 && e.range.columnEnd == 3 &&  // only look at edits happening in col C which is 3
        e.range.rowStart == e.range.rowEnd ) {  // only look at single row edits which will equal a single cell
      checkCellValue(e); 
    }
  } catch (error) { Logger.log(error); }
};

function checkCellValue(e) {
  if ( !e.value || e.value == 0) {  // Delete if value is zero or empty
    e.source.getActiveSheet().deleteRow(e.range.rowStart);
  }
}

Это только просмотр значения из одного изменения ячейки теперь, а не значений всего листа.

0
задан Be Ta 2 April 2019 в 11:58
поделиться

1 ответ

Вы пробовали это:

string stringThatKeepsYourHtml = "<div id=Pcontent....";
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(stringThatKeepsYourHtml);
string whatUrLookingFor = doc.GetElementbyId("Pcontent").InnerHtml;
0
ответ дан Ali 2 April 2019 в 11:58
поделиться
Другие вопросы по тегам:

Похожие вопросы: