Excel Data Source

In this sample, you'll see how to change the template programming language to VB.NET, and how to generate a list coming from an Excel Data Source.

1. First of all, change the programming language of the Xpertdoc template by clicking the Properties button and changing the Language Property. Properties Button Select language
2. Click on the Data Sources button to prompt the form. Data Sources Button
3. Click on the Add a new connection button. Add a new Connection Button
4. Choose the appropriate type of connection. Choose Connection Type
5. Browse for the Excel file you want to be included in the template, then press the Test Connection Button to be sure that everything is working fine. Browse for an Excel File and Test the Connection
6. Click on the Add a new command Button. Add a new command Button
7. In the Xpertdoc Command form, you can choose the desired sheet and columns you want in your template. Command Tables Command Columns
8. Next, click on the Generate Query button and you should get a query with the table and columns you chose. Generate Query Button The Generated Query
9. Click twice on OK and then close the Data Sources Form. Create a table with 2 rows and 4 colums. Put your cursor in the top right cell and click on the Insert Statement Button. Insert Statement Button
10. Right click on the command line in the tree view on the left and choose Insert Start Loop. Insert Start Loop
11. Add titles to the first row of the table and put your cursor on the second row. Click on the Insert Expression Button. Insert Expression Button
12. Right click on the column you want to add in the tree view and choose Insert Column(Inside Loop). Repeat this step for each columns. Insert Expression Column
13. Put your cursor in the last cell. Click the Insert Statement Button and right-click on the command line in the tree view. Choose Insert End Loop. Insert End Loop
14. Your table should look like the one below. You can change the style of the table if you want.
Table
15. Click on the Preview Button to see the result. Preview Button
16. The resulting table with the datas coming from the Excel should look like this one.
Resulting Table

Watch Video
Download Source/Xpertdoc 2007
Return to the list of samples

Ask a question / Get Support