# Create a WebPage from Selected Cells

The Create a Web Page from Selected Cells option is used to select one or more cells in the Spreadsheet and automatically create a WebPage with property bound WebPage Elements, based on the selected cells and Controls Functions in the Spreadsheet. With this option, Tags and Input and Output pins will also automatically be generated and linked together.

Note:

- When generating a WebPage, the default values used in the WebPage element properties and Tags will be based on the values in the Spreadsheet at the time the WebPage was created.

- Before generating the WebPage, give the cells containing the content that will be published on the WebPage. This is helpful when the Task will have a large number of Input and Output pins. See the Cell Name topic for information on how to assign the cell a meaningful name.

  Changing the names of the Input and/or Output pins after the WebPage has been created will break the linkage between the Spreadsheet cells and the WebPage elements. Therefore, Cognex recommends creating meaningful cell names prior to using the Create a Web Page from Selected Cells option.

- When using this option to generate a WebPage, the Bound property is the only aspect of the Spreadsheet function that will be updated based on the interaction in the WebPage. The state of the cell (established using the Cell State Dialog) will not be automatically configured. For example, if a cell is conditionally enabled, and its state is changed while offline by pressing the button, the related WebPage element will not be enabled and/or disabled.

  Once the WebPage has been created, except for the bound properties, any changes made to the WebPage and/or Spreadsheet will not be reflected in the other. Therefore, there are two options to keep the two in sync:

  1. Create a new WebPage based on the updated Spreadsheet values.
  2. Manually update the WebPage and Spreadsheet to keep them synchronized.
- To undo the creation of a WebPage, you must delete the generated WebPage, as well as the Tags, and then unpublish the cells in the Spreadsheet, using the Right-Click Menu.

1. Select the cell(s) containing the function(s) you want to expose as an input pin, use the Right-Click Menu and select Create a WebPage from Selected Cells.

2. The cells will be assigned as an input or output pin, and given a name, based on the Cell Name. If a cell has not been given a unique name, the pin name will be based on the type of function in the cell or generically as an input or output. They will then appear in the Properties.

3. A WebPage will be created, based on the selected cells and their cell types.

   Note:
   - The minimum size of the created WebPage is the default WebPage size, 1024 pixels by 768 pixels. However, the WebPage that is created will automatically be resized to fit the generated WebPage elements.
   - If Controls Functions, such as an EditRegion function, is selected, the function it references will automatically be selected and configured as an In-Sight Display, even if the cell containing the function was not selected at the time the WebPage was created.
   - See the Spreadsheet Cells to WebPage Controls topic for more information about the types of cells that are supported and the type of WebPage Elements that are generated and configured.