officedev / office-scripts-docs Goto Github PK
View Code? Open in Web Editor NEWOffice Scripts Documentation
Home Page: https://learn.microsoft.com/office/dev/scripts
License: Creative Commons Attribution 4.0 International
Office Scripts Documentation
Home Page: https://learn.microsoft.com/office/dev/scripts
License: Creative Commons Attribution 4.0 International
From @peronald:
I think we should show a user how to undo a script by going into the version history of the document. If a user runs a script and sees that they cannot undo it, they may have concerns. To alleviate their stress, we should probably include a section on how to 'undo' a script.
Could not find the automate tab since Excel hides it behind a drop down arrow.
Open the Automate tab and press Record Actions.
We finally enabled and got the automate ribbon in excel for web enabled however both Record Actions and Code Editor sub windows are not loading/are blank. Is the some additional setting than we need to install/enable?
Additional info: The help sub window does populate correctly, so not sure.
The Description field can be used to provide context as to what the script does. You can leave the Description blank for the tutorial.
(Optional) Fill in the Description field so you can remember what the script does later.
When viewing the "Overview" page, I'm expecting to see a broad "what is this thing" section, followed by in-depth sections on what I need to know. Currently, I think the article does a good job with the in-depth sections, but omits a broader first section that is more detailed than the index, but less than the current sections.
E.g.
Examples, gifs, motivate why this is awesome
Maybe case examples? Defer to Power Automate marketing approaches/docs framing
Brief overview of baseline skill sets required for certain things
Outline the components and their general functions—current sections would probably be subsections here.
https://github.com/OfficeDev/office-scripts-docs/blob/master/docs/overview/overview.md
[We now automatically save a script after a user stops recording. The script details pane contains options to rename a script (hover over script name or look in the ... menu) and update its description]
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
"Request features" at https://aka.ms/oscripts
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Title—suggest at least one photo (or better yet, gif) per major UI component
https://github.com/OfficeDev/office-scripts-docs/blob/master/docs/overview/overview.md
Could you please offer more details concerning Office Scripts and Security? The statement "no JavaScript auth tokens can be shared with (office?) scripts" is a bit vague.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Great tutorial! Got it working ok, struggled with adding my file path though - I could only add through using the pop-up file-selection GUI, instead of entering my filepath maunally (i.e. same path for example "/TestFolder/task-reminder.xlsx" but it failed on testing).
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
A common scenario is how Office Script ownership transfer should be handled when the Office script creator is no longer with the organization or for any reason an ownership transfer of the Office Script is desired.
Please describe in detail how ownership transfer can be performed by Office Script owners and tenant administrators. Include in the description what permissions are required, and whether it is possible to administratively transfer ownership from one user account to another. And is Modern M365 group ownership supported for Office Scripts? (If yes, please describe any transfer process relating to Group owned Scripts.)
Also describe default retention policy for Office Scripts after a user has left the organization and is deactivated in Azure Active Directory. Reference: https://docs.microsoft.com/en-us/onedrive/retention-and-deletion
see suggested correction in Issue section below
Please be more precise for what access permissions this is true, "Important: Anyone with access to a workbook can view and run its attached scripts." Perhaps instead should read, "Anyone with Edit access to a workbook..." Users with Read access should be able to view the workbook but not be able to run scripts.
From @gergzk:
One maybe minor thing that popped to my eye: the examples use a mix of let and const, and thinking about the feedback from MAKER, people might already find these confusing so having two of them could be worse?
The recorder intentionally creates lines of code with 'let' because it's not opinionated that these should be const and if someone wants to play with the code it's one less hurdle, but that's a pretty philosophical and unproven reason. Is there a consistency thing here we should be paying more attention to?
I can't find a solution for my macro:
function main(workbook: ExcelScript.Workbook) { let foglioVittorio = workbook.getWorksheet("Vittorio Zigiotto") let tabella = foglioVittorio.getTable("VittorioZigiotto") // Auto fill range tabella.addColumn() tabella.addColumn() tabella.addColumn() tabella.addColumn() tabella.addColumn() tabella.getRange(SOMETHING) .autoFill(SOMETHING, ExcelScript.AutoFillType.fillDefault);
function main(workbook: ExcelScript.Workbook) { let selectedSheet = workbook.getActiveWorksheet(); // Auto fill range selectedSheet.getRange("IC1:IG301") .autoFill("IC1:IL301", ExcelScript.AutoFillType.fillDefault); }
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
observe the strange autofit formatting
Is this dependent on screen size or other settings?
How will users report these errors (Makers?)
Open the Automate tab and press Record Actions.
This makes it easier to follow verses missing a step, especially as on a laptop people will be switching focus between tabs from reading the tutorial to playing with excel.
Could a new article be written on the topic of how to restore deleted scripts (from OneDrive)? This will be a good reference for support when customers accidentally delete or troubleshoot when they don't see a Script they expect in the available scripts.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
In the next documentation:
https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel
It explains that the scripts can be saved, where are the scripts stored? is it the same Git Hub options as ScriptLab?, I need to know If I don't necessarily need a Git Hub account before asking my It Admin to enable the Automate Ribbon option
[20, 42] Argument of type 'string | number | boolean' is not assignable to parameter of type 'number'.
Type 'string' is not assignable to type 'number'.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Notes in overview are a bit overwhelming as a first-time reader; I'm expecting to see a very simple, rapid on-ramp towards (1) knowing "enough" and (2) trying the product out. I recommend significantly condensing or even omitting most of the Note content that is shown currently.
https://github.com/OfficeDev/office-scripts-docs/blob/master/docs/overview/overview.md
ja-jp:"https://docs.microsoft.com/ja-jp/office/dev/scripts/develop/power-automate-integration"
en-us:"https://docs.microsoft.com/en-us/office/dev/scripts/develop/power-automate-integration"
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Becomes more obvious if you read it from the persona of "I only know Excel, I've never programmed before (or I've used VBA a few times)."
Suggest emphasizing TypeScript less and giving a brief overview of what it is with a link to the TypeScript site.
https://github.com/OfficeDev/office-scripts-docs/blob/master/docs/overview/overview.md
Tutorial
Office Scripts settings in M365
The first article indicates the service is enabled per user, but the steps to enable Office Scripts in the 2nd link are tenant-wide. Also, enabling the service has no effect in the Excel Web UI, hoping for either an updated timeline for availability.
It might be reasonable to word the following to indicate that things can be learned as they go along so we don't scare people off.
[LOC]Fixed inappropriate japanese "Power Automate Office スクリプトを実行する"→"PowerAutomate を使用して Office スクリプトを実行する" (ja-jp)
related:#257
ja-jp:"https://docs.microsoft.com/ja-jp/office/dev/scripts/develop/power-automate-integration"
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Reconsider how the API requirement sets are discussed on the overview page:
https://review.docs.microsoft.com/en-us/office/dev/scripts/overview/overview?branch=master#office-javascript-api
The TableStyle isn't consistent across platforms.
Original:
When the function is executed, Excel application invokes this main function by providing the workbook as its first parameter.
Proposed:
When the function is executed, the Excel application invokes this main function and provides the workbook as its first parameter.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Once the office-scripts-docs-reference repo is live, we'll need to adjust all the reference API links. We'll also need to setup a fusion TOC between the two repos.
Excel product name is inconsistent with other documentation; see:
(Google search suggests correct name is "Excel for the web")
I think we should specify that admins needs to do their part to opt-in. Current language sounds like user should do it.
...
Prerequisites
Before starting this tutorial, you'll need access to Office Scripts, which requires the following:
Excel on the web.
Opt-in to the Office Scripts preview (admin-enabled). This adds the Automate tab to the ribbon.
Recommended add to existing article: Scripts are stored in the OneDrive /Documents/Office Scripts location of the Script owner. They are saved as .osts extension.
https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel
Notifying Office Script creators of the default location of Office script files will provide better visibility in locating and/or identifying the Office Script files in their OneDrive. There may also be administrative or security related reasons to be able to identify what .osts files are and where they are located by default.
Any workbook change is recorded as one or more write operations in the script. Scripts can also read data from a workbook.
What are read or write operations?
In the page, https://review.docs.microsoft.com/en-us/office/dev/scripts/?branch=master it will be useful to link to the official blog post announcement.
From Shreedhar:
"This article describes the areas of Office Scripts in Excel on the web that require you to have a better understanding of how the script code works with Excel."
Too wordy and I don’t understand what we are conveying here.
Under the prerequisites section "Opt-in to the Excel Scripting preview" this should include a walk through of how the IT admin can enable preview. It may also be worth including "Admin must opt-in to the Office Scripts preview" to match the necessary action.
Hello,
I failed to get the number of tables using getCount().
The workaround to get the number of items in the tableCollection is to use myTables.items.length
vAllSheetTables.load('items/length');
await context.sync();
console.log(vThisTable.name);
console.log(vAllSheetTables.items.length);
The only property available for the getCount() method is 'value' and I can't load it.
What's the syntax to use getCount() in order to read the number of items in the collection?
Thanks
Regards
David
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Explain the concept of when and how to use “Make a Copy”.
Either create a new, separate article or add to “Learn the basics of Office Scripts”
https://docs.microsoft.com/en-us/office/dev/scripts/tutorials/excel-tutorial
If you want to create a "template" script and later create independent copies of that template script, you must “Make a Copy” of the script. This is important to understand in the use scenario where you want to make a workbook “template” with multiple copies and customize each copy’s script.
[Enter feedback here]
In conversation with Petra, my understanding is Safari is not supported due to disallowing 3rd party cookies by default. However Safari's inclusion here doesn't make that point clear, so if it is accurate that Safari is still not supported at present, then this should be stated and explained.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
[Enter feedback here]
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The Docs currently offer a choice of TypeScript or JavaScript however only TypeScript is supported in the Script Editor.
I am not finding any documentation on how to get data from other Excel workbooks. I know this is possible with Google App Script, but it does not look I am finding anything about this with Office Script
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
We have officescripts enabled for users in our organization still no user can see automate ribbon in excel for web.
https://docs.microsoft.com/en-us/office/dev/scripts/testing/platform-limits#third-party-cookies
We have office scripts enabled for users in our organization still no user can see automate ribbon in excel for web.
We checked with various browsers with all cookies enabled and in private session as well. All users in organization faces issue.
Is the feature available for yet to deliver. If feature is available then why automate ribbon is not available for our users.
Hi,
How to insert an image from one sheet to another by script?
or
How to insert an image from the folder to the excel sheet by script?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
In the section for Ranges (https://docs.microsoft.com/en-us/office/dev/scripts/develop/scripting-fundamentals#ranges)
It is explained that A1 notation refers to row A and column 1.
Shouldn't it be the contrary? The letter refers to column header and the number refers to row header.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.