Menu

Design Excel worksheets

Wolfgang Stamm
Attachments
BindATable.tiff (74188 bytes)
DefineName.tiff (67946 bytes)
DocumentProperties.tiff (36968 bytes)
ExcelMvcProperty.tiff (68834 bytes)
ViewName.tiff (77266 bytes)
Worksheets.tiff (11372 bytes)

Design Excel worksheets for ExcelMVC

Preparing Excel spreadsheets as views for your .NET application is not difficult. The task can be accomplished by any Excel user, no programming skills are needed. As a software developer, you can focus on development of the underlying business model. Your local GUI-designer or Excel power-user can tailor the user interface (view) of your software.

Step 1: Set custom document property

Go to the properties section of your Excel workbook. Open the Properties drop down and go to Advanced properties.


Create a new property which you will call ExcelMvc and give it a unique value. Remember the value when you finalize the data binding in your .NET code. For now, any unique string will do it.

Step 2: Add new worksheet for data binding

Create a new worksheet in your workbook and name it ExcelMvc. The worksheet will be identified by this name. The worksheet can be placed anywhere in your workbook. Of course, when you've finished setting up data binding, you might want to hide the ExcelMvc worksheet from your users.

Step 3: Tables, forms and commands

It is time to decide how users will interact with your .NET application. ExcelMvc distinguishes between tables, forms and commands.

Use tables if you have a set of data elements and each data element is of the same type. Think about the orientation of tables. If your data type has few properties but your application tends to have many object items of this data type, a portrait table might be best (the properties of your .NET type will become column headers of your table in Excel). If you have a lot of properties but only few object items in your application, you might want to transpose the table (the properties of your .NET type will become row headers of your table).

Step 4: Enter binding data

Step 5: Define name


Related

Wiki: Home