kjell nilsson

Hi.
Background:
I have created an add-in for excel that opens a form that lets the user graphically select what data he wants to view. The result of the input is formatted as an sql string, and I want to show the result of the query in an excel document.
* the result file i quite big. 256*100 000 rows i might add

I am considering the following:

1. Copy data from the Sql server to an Excel sheet. Something like this:
Sheet1.Range("A1").CopyFromRecordset myrecordset
2. Is there a way, programmatically, to let excel directly show the result from the sql-query through a "view-connection " to the database So to say that Excel always shows what data the sql server contains.

I would prefer the last solution if that is possible.

Or is there any other smart way to do this

Best Regards Kjell Nilsson




Re: Visual Studio Tools for Office Viewing the result of an sql query in excel.

Cindy Meister

Hi Kjell

There used to be a way to dynamically link Excel to databases, but I think MS had to remove it due to some kind of lawsuit. Best would be to ask this in the Excel.programming newsgroup, as the specialists there will know for sure.