Create a Custom User Form in Excel for the Web with Office Add-ins
Question details
The user wants a custom form in Excel for the web that displays a worksheet record with more than 20 columns.

- Product
- Microsoft Excel for the web
- Device & OS
- not provided
- Scenario
- A user selects a worksheet cell or row and wants to view its record in a custom interface.
- Observed behavior
- The desired interface should read the selected record and display its fields in a task pane or dialog; desktop VBA UserForms do not run in Excel for the web.
Identify the worksheet, header row, and columns that make up each record. Check that your organization allows Office Add-ins and that the Excel APIs you need are supported in your target environment.
Build an Office Add-in with a Custom Task Pane
Use a web-based Office Add-in to display the selected worksheet record in Excel for the web.
An Office Add-in uses HTML, CSS, JavaScript, and the Office JavaScript API. It is a separate web interface, not a conversion of a VBA UserForm.
Selection-change events can update the form as the user selects another cell, where the required Excel API is supported.
Follow Microsoft's Office Add-ins documentation to create an Excel task pane add-in with a manifest and a web page containing your HTML, CSS, and JavaScript.
Add labeled fields to the task pane page for the worksheet's record columns. Use a scrollable layout or sections if more than 20 fields need to be displayed.
In the add-in's JavaScript, use Office.onReady and Excel.run, then call getSelectedRange to identify the selected row. Read the corresponding worksheet range across the record columns and load its values into the form.
Register a worksheet onSelectionChanged handler, where supported, to read the newly selected row and update the task pane fields. Re-register the handler when the add-in starts.
Deploy or sideload the manifest using the method available to your organization, open the add-in in Excel for the web, and select different data rows to verify that the correct fields appear.

Work with Excel Records in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Excel format compatibility, making it easier to move existing workbooks between applications. It does not replace the Excel for the web Office Add-in described above.

Frequently Asked Questions
Can I run an existing VBA UserForm in Excel for the web?
No. Excel for the web does not run desktop VBA UserForms. Rebuild the interface as an Office Add-in using web technologies and the Office JavaScript API.
How can the form show the row I selected?
Use Excel.run and getSelectedRange to identify the selection, then read the record's column range from that row. A worksheet onSelectionChanged handler can refresh the form when the selection changes, where supported.
Can an Office Add-in display more than 20 columns?
Yes. Read the relevant worksheet range and render its values as labeled fields in the task pane. A scrollable layout or grouped sections can make a long record easier to navigate.
Will changes in the form automatically update the worksheet?
No. Add JavaScript that writes edited field values to the appropriate worksheet range, and provide a button such as Save for the user to submit the changes.
What if I cannot load the add-in in Excel for the web?
Check the manifest and deployment instructions in Microsoft's Office Add-ins documentation. Also ask your administrator whether your organization permits sideloading or requires centralized deployment.




