Use this code to import excel data. You can find the same example in silk test help also.
[+] testcase DBColumnsExample () appstate none [ ] // Retrieve all columns beginning with the letter 'i' (or 'I') for all tables [ ] // beginning with the letter 'p' (or 'P'). [ ] // Assume that hdbc is a valid database handle returned from DB_Connect(). [ ] STRING cat, sch, tbl, col, ignore, table, column, dtype [ ] [ ] tbl = "p%" [ ] cat = NULL [ ] sch = NULL [ ] col = "i%" [ ] [-] HDATABASE hdbc [ ] HSQL hstmnt [ ] [ ] [-] hdbc = DB_Connect("DSN=<DSNNAME>") [ ] [ ] hstmnt = DB_Columns (hdbc, cat, sch, tbl, col) [ ] [ ] // retrieve and print only column name and type; ignore the rest. [-] while(DB_FetchNext (hstmnt, ignore, ignore, table, column, ignore, dtype)== TRUE) [ ] Print ("({dtype}) {table}.{column}") [ ] DB_FinishSql (hstmnt) [ ] [ ] DB_Disconnect (hdbc) |