I need to adapt the function below in order to get it working only in a 2d range A2:H10
Any help?
function processDocuments() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const customersSheet = ss.getSheetByName(CUSTOMERS_SHEET_NAME);
const productsSheet = ss.getSheetByName(PRODUCTS_SHEET_NAME);
const transactionsSheet = ss.getSheetByName(TRANSACTIONS_SHEET_NAME);
const invoicesSheet = ss.getSheetByName(INVOICES_SHEET_NAME);
const invoiceTemplateSheet = ss.getSheetByName(INVOICE_TEMPLATE_SHEET_NAME);
const products = dataRangeToObject(productsSheet);
const transactions = dataRangeToObject(transactionsSheet);
const invoices = [];
transactions.forEach(function (customer) {
let invoice = createInvoiceForCustomer(
customer, products, transactions, invoiceTemplateSheet, ss.getId());
invoices.push(invoice);
});
}