Tables in Excel with VSTO

I'm really new to VSTO, so sorry if this is a newbie question.

I am working on a data entry application where I need the user to receive data in an excel table (for example, when you select a bunch of rows and click "Format as table"), then I need to read the data from this table and work with it in C # .

At a basic level, I have a C # schema in some format. I need to create a table in Excel in this format (column rules + validation rules for types. Some of the types are enumerations, so I suppose I need to create a list on another sheet with all the enumeration values ​​and specify this list for binding). After creating the table, the user begins to enter data, and when they close excel, I read the data. I figured out how to do this using only raw cells, but I was unable to create tables or validation rules. Any ideas?

Also, where can I find good resources for excel VSTO programming?

Thanks,
Roy

+4
source share
1 answer

After much research, I found a better way to use the SetDataBinding method inside a ListObject. Here is an example: ListObject.SetDataBinding

And for using Enums, I found documentation on validation methods here: Excel Validation

+2
source

Source: https://habr.com/ru/post/1286772/


All Articles