MetaData for a range
function displayMetaDataForARange() {
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName('Sheet1');//change sheet name as required
const rg = sh.getRange(1,column,sh.getLastRow());//change column as required
var v = rg.createDeveloperMetadataFinder().onIntersectingLocations().find();
let md = [];
v.forEach(e => {
let obj = {};
obj['key'] = e.getKey();
obj['value'] = e.getValue();
obj['visibility'] = e.getVisibility();
if (e.getKey().toString().slice(0, 3) == 'row') {
obj['A1'] = e.getLocation().getRow().getA1Notation();
let w = getRowWidth(e.getLocation().getRow().getRow(), sh, ss);
obj['rowWidth'] = w;
obj['rowvalues'] = e.getLocation().getRow().getValues().flat().filter((r, i) => i < w).join(',');
} else {
obj['A1'] = e.getLocation().getColumn().getA1Notation();
let h = getColumnHeight(e.getLocation().getColumn().getColumn(), sh, ss);
obj['colheight'] = h;
obj['colvalues'] = e.getLocation().getColumn().getValues().flat().filter((c, i) => i < h).join(',');
}
obj['id'] = e.getId();
md.push(obj);
//e.remove();
});
SpreadsheetApp.getUi().showModelessDialog(HtmlService.createHtmlOutput('<textarea rows="25" cols="150">' + JSON.stringify(md) + '</textarea>').setWidth(1200).setHeight(600), 'Meta Data');
}- [creating markdown tables](https://stackoverflow.com/questions/66772208/a-script-to-simplify-creating-a-so-table)