@Wamwitha Love [you are correct that currently Office Scripts are only supported on desktop clients. In the case of wanting mobile support, what type of device were you hoping to run the script on? What type of experience were you expecting on mobile?]
-- thanks.
Are you support for MS Scripts? Well I have been dabbling in VB and VBA for a few years, writing scripts when I need them.
Type of experience expecting?
I was hoping that a function() would work on my Android device the way it works on my Desktop. My Android Device has more functionality that a super computer of 1960, I didn't expect it to fail is the point. An experience of VB scrips that run in Excel is the experience I was expecting. I'm not sure what you mean by the question. Unless you haven't written VB or VBA.
At this point it's fuzzy because I had to jump through hoops to get my script to work on my Desktop PC. I had to go to "script.google.com", I created my script and named it "macros.gs" to run a typical set of function calls to perform Automatically.
I'd like to run these scripts (what you call *.gs files from scripts.google.com) on my Galaxy Android Mobile device where many of my colleagues share Google-Sheets (Excel sheets).
I assume you write VB or VBA or *.gs Scripts for Excel or Access? Here's an easy function; copy sheet and date it:
[
function copy_sheet() {
var source = SpreadsheetApp.getActiveSpreadsheet();
var sheet = source.getSheetByName('OUTPUT');
var date = Utilities.formatDate(new Date(), "GMT+1", "yyyy-MM-dd")
sheet.copyTo(source).setName(date); //duplicates current sheet and renames it - one shot
}
]
Add Button to run macro/scripts: [copy sheet]
Here's something else that's normal:
var emp_amt = spreadsheet.getRangeByName("emp_Amt").getValue();
var emp_arr = new Array(emp_count);
create_employee_array("EMP", emp_arr, emp_count);
function create_employee_array(range_name, arr, count)
{
var spreadsheet = SpreadsheetApp.getActive();
for( var i = 0; i < count; i++)
{
arr[i] = spreadsheet.getRangeByName(range_name).offset(i,0).getValue();
}
}
function paint() {
var spreadsheet = SpreadsheetApp.getActive();
//spreadsheet.getActiveRangeList().setFontWeight('bold')
spreadsheet.getCurrentCell().setFontWeight('bold')
.setHorizontalAlignment('center')
.setBackground('#a8d08d')
.setBackground('#b6d7a8')
.setBackground('#d9ead3')
.setBorder(true, true, true, true, true, true, '#000000', SpreadsheetApp.BorderStyle.SOLID);
};
I also perform calculations and add them normally:
else
{
spreadsheet.getCurrentCell().offset(row, COL_CK).setValue(amt);
spreadsheet.getCurrentCell().offset(row, COL_CASH).setValue(0);
}