OfficeDev / office-scripts-docs

Office Scripts Documentation
https://learn.microsoft.com/office/dev/scripts
Creative Commons Attribution 4.0 International
186 stars 51 forks source link

Add folder description #726

Closed philipwolfe closed 8 months ago

philipwolfe commented 8 months ago

Add the specific folder and file type for the scripts used in this sample.

learn-build-service-prod[bot] commented 8 months ago

Learn Build status updates of commit 01d7952:

:white_check_mark: Validation status: passed

File Status Preview URL Details
docs/resources/samples/combine-worksheets-into-single-workbook.md :white_check_mark:Succeeded View

For more details, please refer to the build report.

For any questions, please:

philipwolfe commented 8 months ago

Hi @AlexJerabek, I have been following this sample through the web based version of Power Automate. This is my first time using Power Automate an I spent quite a bit of time researching how to make the script names show up in the Script drop down list. At one point Copilot told me that the file extension should be .officescript and another time it told me that it should be .os. I was lost on this step. I finally found a site that defined what the default folder is and another site that told me the file extension letters. I thought this addition would help clear it all up.

If I add in the part about the code editor, that may be more confusing for people using the web because there is no code editor. Are you thinking that people are using the desktop app? This sample may need different instructions sections based on your editor.

AlexJerabek commented 8 months ago

Hi @philipwolfe,

I think I understand your confusion. These samples are written from the perspective of someone starting with Office Scripts and going to Power Automate, but it sounds like you're going the other direction, which is equally important.

The Code Editor is the term for the task pane where Office Scripts are written and edited. It's what pops up when you select New Script or edit an existing script. This feature is on all platforms (web, Windows, and Mac).

image

The easiest way to create these scripts is:

  1. Open Excel.
  2. Select Automate > New Script.
  3. Paste the code from the sample.
  4. Select the script name (Script X) and rename it as needed.
  5. Save the script by selecting Save script.

While the file location and format are documented here, it's not necessary knowledge to use Office Scripts.

If it sounds reasonable to you, I'll take the suggestion to make it clear in these samples that the user should have Excel open and use the editor to paste code. This will also ensure any file encodings are included and no knowledge of the file format is needed.

philipwolfe commented 8 months ago

Yep, that is fine. I have seen some Microsoft samples support different scenarios. Powershell vs Bash for example. C# vs JavaScript for example. If there enough web users, then maybe this sample has the same. Office Desktop vs Office 365 for example.

AlexJerabek commented 8 months ago

Closing in favor of #729, which should go live later this afternoon. Hopefully that clarifies the expected steps for readers coming from the PA space. Please let me know if there are other documentation improvements we should make. Thanks!