In a Google docs spreadsheet. If cells A1 & A2 are merged, is there a way to confirm they are merged, using google apps script?
There is a merge function in GAS https://developers.google.com/apps-script/class_range#merge
But there is no function or example that shows how to check if cells are merged.
getValues etc just returns an empty string for the cell. e.g. this does not work.
function testMerge() {
var spreadsheet = SpreadsheetApp.openById('Z3ppTjxNUE........');
var sheet = spreadsheet.getSheets()[0];
var range = sheet.getRange("A3:A4");
var values = range.getValues();
var formulas = range.getFormulasR1C1();
var formulasA1 = range.getFormulas();
range = sheet.getRange("A4");
range.setValue("a");
range = sheet.getRange("A3:A4");
var values2 = range.getValues();
var formulas2 = range.getFormulasR1C1();
var formulasA12 = range.getFormulas();
var count = range.getHeight();
}