Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

From: Count Tatte

Newsgroups: sybase.public.sqlanywhere.general

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?

asked 08 Nov '10, 12:31

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

edited 06 Aug '11, 17:23

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:

permanent link

answered 08 Nov '10, 12:33

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

Comment Text Removed

I wasn't sure about posting this Q&A because it was so "derivative", but I did so because it was an opportunity to enter a straightforward "How do I..." question on this subject (which keeps coming up). And judging from the votes it looks like it's a hit :)... so OTHER FOLKS are welcome to do the same: If you have searched and searched and answered your own "How do I..." question, PLEASE POST THE RESULTS HERE! Thanks!

(08 Nov '10, 20:03) Breck Carter

I fully second that invitation to publish one's self-learning efforts. (And that makes so much more fun in SQLA than in the newsgroups, as you get valueable feedback through upvotes and comments and therefore get to know if others could share your insight...)

(09 Nov '10, 15:41) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Nov '10, 12:31

question was seen: 8,541 times

last updated: 06 Aug '11, 17:23