Free Shipping on all orders.
Free Shipping on all orders.
function logProductInfo() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
for (var i = 0; i < data.length; i++) {
Logger.log('Product name: ' + data[i][0]);
Logger.log('Product number: ' + data[i][1]);
}
}
function addProduct() {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(['Cotton Sweatshirt XL', 'css004']);
}
function formatMySpreadsheet() {
// Set the font style of the cells in the range of B2:C2 to be italic.
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var cell = sheet.getRange('B2:C2');
cell.setFontStyle('italic');
}
function validateMySpreadsheet() {
// Set a rule for the cell B4 to be a number between 1 and 100.
var cell = SpreadsheetApp.getActive().getRange('B4');
var rule = SpreadsheetApp.newDataValidation()
.requireNumberBetween(1, 100)
.setAllowInvalid(false)
.setHelpText('Number must be between 1 and 100.')
.build();
cell.setDataValidation(rule);
}
function newChart() {
// Generate a chart representing the data in the range of A1:B15.
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var chart = sheet.newChart()
.setChartType(Charts.ChartType.BAR)
.addRange(sheet.getRange('A1:B15'))
.setPosition(5, 5, 0, 0)
.build();
sheet.insertChart(chart);
}
var rootCell = spreadsheet.insertSheet('pivotTableSheet').getRange('A1');
// Add data source pivot table and set data source specific configurations.
var dataSourcePivotTable = rootCell.createDataSourcePivotTable(dataSource);
var rowGroup = dataSourcePivotTable.addRowGroup('season');
rowGroup.sortDescending().setGroupLimit(5);
dataSourcePivotTable.addColumnGroup('win_school_ncaa');
dataSourcePivotTable.addPivotValue('win_pts', SpreadsheetApp.PivotTableSummarizeFunction.AVERAGE);
dataSourcePivotTable.addPivotValue('game_date', SpreadsheetApp.PivotTableSummarizeFunction.COUNTA);
var filterCriteria = SpreadsheetApp.newFilterCriteria()
.whenTextEqualToAny(['Duke', 'North Carolina'])
.build();
dataSourcePivotTable.addFilter('win_school_ncaa', filterCriteria);
// Get a regular pivot table instance and set shared configurations.
var pivotTable = dataSourcePivotTable.asPivotTable();
pivotTable.setValuesDisplayOrientation(SpreadsheetApp.Dimension.ROWS);
var status = dataSourcePivotTable.getStatus();
Logger.log('Initial state: %s', status.getExecutionState());
dataSourcePivotTable.refreshData();
status = dataSourcePivotTable.waitForCompletion(/* timeoutInSeconds= */ 60);
Logger.log('Ending state: %s', status.getExecutionState());
if (status.getExecutionState() == SpreadsheetApp.DataExecutionState.ERROR) {
Logger.log('Error: %s (%s)', status.getErrorCode(), status.getErrorMessage());
}
// Add data source with query parameter.
function addDataSource() {
SpreadsheetApp.enableBigQueryExecution();
var spreadsheet = SpreadsheetApp.getActive();
// Add a new sheet and use A1 cell as the parameter cell.
var parameterCell = spreadsheet.insertSheet('parameterSheet').getRange('A1');
parameterCell.setValue('Duke');
// Add data source with query parameter.
var dataSourceSpec = SpreadsheetApp.newDataSourceSpec()
.asBigQuery()
.setProjectId('<YOUR_PROJECT_ID>')
.setRawQuery('select * from `bigquery-public-data`.`ncaa_basketball`.`mbb_historical_tournament_games` WHERE win_school_ncaa = @SCHOOL')
.setParameterFromCell('SCHOOL', 'parameterSheet!A1')
.build();
var dataSourceSheet = spreadsheet.insertDataSourceSheet(dataSourceSpec);
dataSourceSheet.asSheet().setName('ncaa_data');
}
// Function used to configure event trigger to refresh data source sheet.
function refreshOnParameterEdit(e) {
var editedRange = e.range;
if (editedRange.getSheet().getName() != 'parameterSheet') {
return;
}
// Check that the edited range includes A1.
if (editedRange.getRow() > 1 || editedRange.getColumn() > 1) {
return;
}
var spreadsheet = e.source;
SpreadsheetApp.enableBigQueryExecution();
spreadsheet.getSheetByName('ncaa_data').asDataSourceSheet().refreshData();
}
We use GPS tracking to ensure that your documents are served to the correct person at the correct location. You can have peace of mind knowing that your documents are being served accurately and efficiently.
We offer flat rates for all of our process serving services so you know exactly what you'll be paying upfront. No hidden fees or surprises.
Our process servers have years of experience in the legal industry and are trained to handle even the toughest cases. They are dedicated to serving your documents efficiently and professionally.
We offer online payment and tracking so you can easily manage your account and see the status of your documents in real-time. It's quick, easy, and convenient.
/**
* Generates a login activity report for the last week as a spreadsheet. The
* report includes the time, user, and login result.
* @see https://developers.google.com/admin-sdk/reports/reference/rest/v1/activities/list
*/
function generateLoginActivityReport() {
const now = new Date();
const oneWeekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
const startTime = oneWeekAgo.toISOString();
const endTime = now.toISOString();
const rows = [];
let pageToken;
let page;
do {
page = AdminReports.Activities.list('all', 'login', {
startTime: startTime,
endTime: endTime,
maxResults: 500,
pageToken: pageToken
});
const items = page.items;
if (items) {
for (const item of items) {
const row = [
new Date(item.id.time),
item.actor.email,
item.events[0].name
];
rows.push(row);
}
}
pageToken = page.nextPageToken;
} while (pageToken);
if (rows.length === 0) {
console.log('No results returned.');
return;
}
const spreadsheet = SpreadsheetApp.create('Google Workspace Login Report');
const sheet = spreadsheet.getActiveSheet();
// Append the headers.
const headers = ['Time', 'User', 'Login Result'];
sheet.appendRow(headers);
// Append the results.
sheet.getRange(2, 1, rows.length, headers.length).setValues(rows);
console.log('Report spreadsheet created: %s', spreadsheet.getUrl());
}
/**
* Generates a user usage report for this day last week as a spreadsheet. The
* report includes the date, user, last login time, number of emails received,
* and number of drive files created.
* @see https://developers.google.com/admin-sdk/reports/reference/rest/v1/userUsageReport/get
*/
function generateUserUsageReport() {
const today = new Date();
const oneWeekAgo = new Date(today.getTime() - 7 * 24 * 60 * 60 * 1000);
const timezone = Session.getScriptTimeZone();
const date = Utilities.formatDate(oneWeekAgo, timezone, 'yyyy-MM-dd');
const parameters = [
'accounts:last_login_time',
'gmail:num_emails_received',
'drive:num_items_created'
];
const rows = [];
let pageToken;
let page;
do {
page = AdminReports.UserUsageReport.get('all', date, {
parameters: parameters.join(','),
maxResults: 500,
pageToken: pageToken
});
if (page.warnings) {
for (const warning of page.warnings) {
console.log(warning.message);
}
}
const reports = page.usageReports;
if (reports) {
for (const report of reports) {
const parameterValues = getParameterValues(report.parameters);
const row = [
report.date,
report.entity.userEmail,
parameterValues['accounts:last_login_time'],
parameterValues['gmail:num_emails_received'],
parameterValues['drive:num_items_created']
];
rows.push(row);
}
}
pageToken = page.nextPageToken;
} while (pageToken);
if (rows.length === 0) {
console.log('No results returned.');
return;
}
const spreadsheet = SpreadsheetApp.create('Google Workspace User Usage Report');
const sheet = spreadsheet.getActiveSheet();
// Append the headers.
const headers = ['Date', 'User', 'Last Login', 'Num Emails Received',
'Num Drive Files Created'];
sheet.appendRow(headers);
// Append the results.
sheet.getRange(2, 1, rows.length, headers.length).setValues(rows);
console.log('Report spreadsheet created: %s', spreadsheet.getUrl());
}
/**
* Gets a map of parameter names to values from an array of parameter objects.
* @param {Array} parameters An array of parameter objects.
* @return {Object} A map from parameter names to their values.
*/
function getParameterValues(parameters) {
return parameters.reduce((result, parameter) => {
const name = parameter.name;
let value;
if (parameter.intValue !== undefined) {
value = parameter.intValue;
} else if (parameter.stringValue !== undefined) {
value = parameter.stringValue;
} else if (parameter.datetimeValue !== undefined) {
value = new Date(parameter.datetimeValue);
} else if (parameter.boolValue !== undefined) {
value = parameter.boolValue;
}
result[name] = value;
return result;
}, {});
}
We offer competitive rates for all of our process serving services. We believe that quality service shouldn't come at a premium price, so we keep our rates affordable for all of our clients.
/**
* Logs Google Sheet information.
* @param {number} rowNumber The spreadsheet row number.
* @param {string} email The email to send with the row data.
*/
function emailDataRow(rowNumber, email) {
console.log('Emailing data row ' + rowNumber + ' to ' + email);
try {
const sheet = SpreadsheetApp.getActiveSheet();
const data = sheet.getDataRange().getValues();
const rowData = data[rowNumber - 1].join(' ');
console.log('Row ' + rowNumber + ' data: ' + rowData);
MailApp.sendEmail(email, 'Data in row ' + rowNumber, rowData);
} catch (err) {
// TODO (developer) - Handle exception
console.log('Failed with error %s', err.message);
}
}
// Create a new form, then add a checkbox question, a multiple choice question,
// a page break, then a date question and a grid of questions.
var form = FormApp.create('New Form');
var item = form.addCheckboxItem();
item.setTitle('What condiments would you like on your hot dog?');
item.setChoices([
item.createChoice('Ketchup'),
item.createChoice('Mustard'),
item.createChoice('Relish')
]);
form.addMultipleChoiceItem()
.setTitle('Do you prefer cats or dogs?')
.setChoiceValues(['Cats','Dogs'])
.showOtherOption(true);
form.addPageBreakItem()
.setTitle('Getting to know you');
form.addDateItem()
.setTitle('When were you born?');
form.addGridItem()
.setTitle('Rate your interests')
.setRows(['Cars', 'Computers', 'Celebrities'])
.setColumns(['Boring', 'So-so', 'Interesting']);
Logger.log('Published URL: ' + form.getPublishedUrl());
Logger.log('Editor URL: ' + form.getEditUrl());
// Log the authorization status (REQUIRED or NOT_REQUIRED).
var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);
Logger.log(authInfo.getAuthorizationStatus());
// Log the URL used to grant access to the script.
var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);
Logger.log(authInfo.getAuthorizationUrl());
Our process servers have years of experience in the legal industry and are trained to handle even the toughest cases. They are dedicated to serving your documents efficiently and professionally.
We offer online payment and tracking so you can easily manage your account and see the status of your documents in real-time. It's quick, easy, and convenient.
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.
Welcome! to Team Bravo Project Management App.Only mambers of the team granted access to P&C Area.