Good day all,
I have created macro-enabled Excel file that unfortunately will be not usable by the company I work at since they decided to use Google sheets.In this Excel workbook,there is one data entry form which looks like that: Data entry form . The data from this form gets written under specific columns in another Excel sheet. In Excel I could use VBA to create the functionality of the 'Submit' button which sends the data to the respective sheet,however,in Google Sheets JavaScript is supported and not VBA.So far, this is the JavaScript function I have managed to create:
function inputData() {
const ss=SpreadsheetApp.getActiveSpreadsheet()
const form=ss.getSheetByName("Input")
const prodlog=ss.getSheetByName("Product log")
const fieldRange=["B1:D1","B3:D3","B5:D5","B7:C7","B9:D9","B11:D11","B13:C13"]
const fieldValues=fieldRange.map(f=>form.getRange(f).getValue())
//console.log(fieldValues)
prodlog.appendRow(fieldValues)
}
However, the appendRow () function doesn't allow specifying where exactly the data should be appended.Any ideas how this can be achieved?Thank you in advance for your suggestions.