RE: $$Excel-Macros$$ Extracting data from SQL server to Excel using macro

2011-07-03 Thread Rajan_Verma
Hi,

You can retrieve the From SQL Server by Creating a connection in Excel with
SQLServer..

 

Data -> Get External Data -> From Other Source ->  From SQL Server 

 

Give the Server Name  and all details , Excel will Create a connection
automatically with Server and take all the Data from Selected Table,

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Markkim
Sent: Saturday, July 02, 2011 9:09 PM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Extracting data from SQL server to Excel using
macro

 

Hi 

 

I know a bit of SQL..   can write a bit of complicated query..  

 

At work, I don't have Write right to SQL server..  because my role is to
investigate and report.

 

I would create a stored procedure and simply bring records I want using
'From other source' in Data tab. 

 

But that's not possible. 

 

What I want is 

 

for Macro to connect to the SQL Server, then feed a query into SQL server..
and bring the result to Excel. 

 

Is it possible? 

 

Is there a book about it, which has some good explaining with a good
examples??   (I have been searching online for hours now) 

 

or do I have to use .net?? (I just know very little bit about it) 

 

any advice will be appreciated. 

 

Ultimately, I'd like to manipulate data from SQL server further in Excel
using Macro. 

 

My target is to make the whole process automatic. 

 

Cheers

 

 

 

-- 

--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Extracting data from SQL server to Excel using macro

2011-07-02 Thread ashish koul
try this


http://www.ozgrid.com/forum/showthread.php?t=83016&page=1

On Sat, Jul 2, 2011 at 9:09 PM, Markkim  wrote:

> Hi
>
> I know a bit of SQL..   can write a bit of complicated query..
>
> At work, I don't have Write right to SQL server..  because my role is to
> investigate and report.
>
> I would create a stored procedure and simply bring records I want using
> 'From other source' in Data tab.
>
> But that's not possible.
>
> What I want is
>
> for Macro to connect to the SQL Server, then feed a query into SQL server..
>   and bring the result to Excel.
>
> Is it possible?
>
> Is there a book about it, which has some good explaining with a good
> examples??   (I have been searching online for hours now)
>
> or do I have to use .net?? (I just know very little bit about it)
>
> any advice will be appreciated.
>
> Ultimately, I'd like to manipulate data from SQL server further in Excel
> using Macro.
>
> My target is to make the whole process automatic.
>
> Cheers
>
>
>
>  --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com 
http://akoul.posterous.com/
*akoul*.wordpress.com 
My Linkedin Profile 


P Before printing, think about the environment.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel