Search This Blog

Saturday, May 18, 2013

2 ways to create dictionary from Excel file

It often happens that you have a dictionary (a list of items to choose) in an Excel file. One easy way to use it with AMODIT is to create normal dictionary in AMODIT and simply copy and paste values. If you select two columns in Excel and copy them to AMODIT then first one will be interpreted as "Name" and second as "Description". But this is static one-time copy, so further changes you will have to make in AMODIT.

But there is also other ways to get dictionary from Excel "live". So every time you change something in Excel file it will be synchronized by AMODIT. To achieve it you have to put your Excel file in a folder on server. Then you create "external dictionary" using Office driver. You just need to use proper connection string refering to Office driver and supplying Excel file's path (see picture below).
Then you need to place sheet name as table name with "[" at beginning and "$]" at end. You can refer to column names and their names have to be stored in first row of the sheet.
 
 
If you do it right AMODIT will read this file once a day and will synchronize dictionary. Quite easy and simple :)

No comments:

Post a Comment