From: Count Tatte
Subject: Copying Excel into database
Date: 8 Nov 2010 02:17:27 -0800
I have some excel sheets i'm going to copy into a sybase database.
I thought of using visual basic code written inside the excel (Send the sheet data via ADODB connection).
Which approach do you suggest i use, is there some ready-made solution?
I heard there is a sqlbulkcopy command that works with MS SQL SERVER. But i guess this doesn't work with Sybase.
Can you give me a hint what is the best solution for a work like this?
You can use CREATE SERVER and CREATE EXISTING TABLE inside SQL Anywhere to use the "proxy table" feature to "pull" data from Excel via SELECT, and insert into a real table via
INSERT real-table SELECT * FROM excel-proxy-table;
This feature has the official name "remote data access" in the Help:
Some information about Excel...
Some sample code...
The following discussion of a problem with Excel also contains an end-to-end example:
answered 08 Nov '10, 12:33