Skip to content

Commit

Permalink
1. Update Yo Office ReadMe to reflect new changes
Browse files Browse the repository at this point in the history
2. Update Custom Functions ReadMe to include new steps required
3. Update CustomFunctions.html to also include INCREMENTVALUE()
  • Loading branch information
TCourtneyOwen committed Jun 13, 2018
1 parent c9cc829 commit e066b48
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 17 deletions.
36 changes: 25 additions & 11 deletions readme.md
Expand Up @@ -42,10 +42,13 @@ $ npm install -g yo generator-office
$ yo office [arguments] [options]
```

The generator is intended to be run from within a folder where you want the project scaffolding created. This can be in the root of the current folder or within a subfolder.

### Command Line Arguments
The following command line arguments are supported. The generator will prompt you accordingly based upon the arguments that you specify.
The following command line arguments are supported. If using the command line arguments, you must use them in the order cited below, or the generator will prompt you for the values.

#### `projectType`
Framework to use for the project. The supported project types include JQuery (`jquery`), Angular (`angular`), React (`react`) and Excel Custom Functions (`excel-functions`). You can also use Manifest Only (`manifest`) which will create only the `manifest.xml` for an Office Add-in.
- Type: String
- Optional

#### `name`
Title of the project - this is the display name that is written the manifest.xml file.
Expand All @@ -59,25 +62,36 @@ The Microsoft Office client application that can host the add-in. The supported
- Type: String
- Optional

#### `framework`
Framework to use for the project. The supported arguments include JQuery (`jquery`), Angular (`angular`), and React (`react`). You can also use Manifest Only (`manifest-only`) which will create only the `manifest.xml` for an Office Add-in.
### Command Line Options
The following command line options are supported. If these are not specified, the generator will prompt you for the values before scaffolding the project. The options should be specified after the projectType, name and host arguments.

Specifying `--output` tells the generator to create the project in a specific location. If the output parameter is not specified, the project will be created in the current directory. If the output option specifies a non-empty folder,
the generator will inform you so you don't accidentally overwrite existing files.

- Type: String
- Optional

### Command Line Options
The following command line options are supported. If these are not specified, the generator will prompt you for the values before scaffolding the project.
Specifying `--js` tells the generator to use JavaScript.

#### `--skip-install`
- Type: Boolean
- Default: False
- Optional

After scaffolding the project, the generator (and all sub generators) run all package management install commands such as `npm install` & `typings install`. Specifying `--skip-install` tells the generator to skip this step.
Specifying `--ts` tells the generator to use TypeScript.

- Type: Boolean
- Default: False
- Optional

#### `--js`
Specifying `--details` tells the generator to provide detailed help, including all the accepted values for each project type and host,

Specifying `--js` tells the generator to use JavaScript.
- Type: Boolean
- Default: False
- Optional

#### `--skip-install`

After scaffolding the project, the generator (and all sub generators) run all package management install commands such as `npm install` & `typings install`. Specifying `--skip-install` tells the generator to skip this step.

- Type: Boolean
- Default: False
Expand Down
16 changes: 10 additions & 6 deletions src/app/templates/excel-custom-functions-preview/readme.md
Expand Up @@ -13,20 +13,24 @@ Learn how to use custom functions in Excel (similar to user-defined functions, o

* Oct 27, 2017: Initial version.
* April 23, 2018: Revised and expanded.
* June 1, 2018: Bug fixes.

## Prerequisites

* Install Office 2016 for Windows and join the [Office Insider](https://products.office.com/en-us/office-insider) program. You must have Office build number 8711 or later.

## To use the project

Follow these instructions to use this custom function sample add-in:
On a machine with a valid instance of an Excel Insider build installed, follow these instructions to use this custom function sample add-in:

1. Publish the code files (HTML, JavaScript) in the same folder on a website.
2. Replace `https://<INSERT-URL-HERE>` in the manifest file (there should be 3 occurrences) with the URL of your website.
3. Sideload the manifest using the instructions found at <https://aka.ms/sideload-addins>.
4. Test a custom function by entering `=CONTOSO.ADD42(3)` in a cell.
5. Try the other functions in the sample: `CONTOSO.ISEVEN(num)`, `CONTOSO.GETDAY()`, `CONTOSO.INCREMENTVALUE(increment, caller)`, and `CONTOSO.SECONDHIGHEST(range)`.
1. On the machine where your custom functions project is installed, follow the instructions to install the self-signed certificates (https://github.com/OfficeDev/generator-office/blob/master/src/docs/ssl.md) .
2. From a command prompt from within your custom functions project directory, run `npm run start` to start a localhost server instance.
3. Run `npm run sideload` to launch Excel and load the custom functions add-in. Additonal information on sideloading can be found at <https://aka.ms/sideload-addins>.
4. After Excel launches, you will need to register the custom-functions add-in to work around a bug:
a. On the upper-lefthand side of Excel, there is a small hexagon icon with a dropdown arrow. The icon is to right of the Save icon.
b. Click on this dropdown arrow and then click on the Custom Functions Sample add-in to register it.
4. Test a custom function by entering `=CONTOSO.ADD42(num)` in a cell.
5. Try the other functions in the sample: `=CONTOSO.ADD42ASYNC(num, num)`, `CONTOSO.ISPRIME(num)`, `CONTOSO.NTHPRIME(num)`, `CONTOSO.GETDAY()`, `CONTOSO.INCREMENTVALUE(increment)`, and `CONTOSO.SECONDHIGHEST(range)`.
6. If you make changes to the sample add-in, copy the updated files to your website, and then close and reopen Excel. If your functions are not available in Excel, re-insert the add-in using **Insert** > **My Add-ins**.
7. Follow @OfficeDev on Twitter for updates and send feedback to <excelcustomfunctions@microsoft.com>.

Expand Down
Expand Up @@ -21,6 +21,7 @@
<li><b>=CONTOSO.NTHPRIME</b> returns the Nth prime. Watch out - it needs a lot of calculation if N is big!</li>
<li><b>=CONTOSO.GETDAY</b> returns the current day of the week as a string.</li>
<li><b>=CONTOSO.SECONDHIGHEST</b> lets you select a range of data and finds the second highest number.</li>
<li><b>=CONTOSO.INCREMENTVALUE</b> increments the value by the number specified.</li>
</ul>
To change the functions, edit <b>customfunctions.js</b> and <b>customfunctions.json<b>. To change the prefix, edit <b>customfunctions-manifest.xml</b>.
For more information, see <a href=https://aka.ms/customfunctions>https://aka.ms/customfunctions</a>.
Expand Down

0 comments on commit e066b48

Please sign in to comment.