Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » MobiLink - Getting Started » MobiLink tutorials » Tutorial: Synchronizing with Microsoft Excel

 

Lesson 1: Setting up an Excel worksheet

In this lesson, you create an Excel worksheet and use the Microsoft Excel Driver to define an ODBC data source. The Excel worksheet stores product information.

Prérequis

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Synchronizing with Microsoft Excel.

The Microsoft Excel driver is a 32-bit driver, so the 32-bit version of the ODBC Data Source Administrator is required for this tutorial.

 Task
  1. Create a working directory called c:\MLobjexcel for server-side components.

  2. Open Microsoft Excel and create a new workbook.

  3. In the default worksheet, add the following contents under the respective A, B, C column headers:

    comment_id order_id order_comment
    2 1 Promotional material shipped
    3 1 More information about material required
  4. Change the default worksheet name Sheet1 to order_sheet.

    1. Double-click the Sheet1 tab.

    2. Type order_sheet.

  5. Save the Excel workbook.

    Save the workbook as order_central.xlsx in the c:\MLobjexcel working directory.

  6. Use the Microsoft Excel Driver to create an ODBC data source:

    1. Click Start » Programs » SQL Anywhere 16 » Administration Tools » ODBC Data Source Administrator.

    2. Click the User DSN tab.

    3. Click Add.

    4. Click Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb).

    5. Click Finish.

    6. In the Data Source Name field, type excel_datasource.

    7. Click Select Workbook and browse to c:\MLobjexcel\order_central.xlsx, the file containing your worksheet.

    8. Clear the Read Only option.

    9. Click OK on all open ODBC Data Source Administrator windows.

Résultat

An Excel worksheet and an ODBC data source are created.