Solved

Access to SQL Database from Excel

Posted on 2013-01-22
4
233 Views
Last Modified: 2013-02-20
Hi all

I have a data stored in Microsoft sql 2005 database.. and 2008 version as well
The sql system is in a secured zone.
I have a Microsoft IIS Web server located in the same network as the sql DBs

I have a local computer desktop Windows 7 Enterprise Edition in a diffrent segment/network.
I have an Microsoft Excel version 2010 Application installed in the Desktop

Deskop Windows can access a shared folder in the same network as the DB via a single  shared folder.
Desktop Windows can access the webserver via an open http://web link outside the firewall

What is the best and secured way to access the DB data stored in MSSSQL DB via Excel.. 2010 Application.

Thanks in Advance for your inputs.

Regards
ZH
0
Comment
Question by:ZURINET
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
sognoct earned 251 total points
ID: 38806117
I'm not a excel expert ... but you can use securely vb script

Public aCon As New ADODB.Connection
Public aCmd As New ADODB.Command

Sub Connect()
  Dim sConn As String
  sConn = "Provider=SQLOLEDB;Trusted_Connection=Yes;Server=[SVR];Database=[DB]"
  With aCon
    .ConnectionString = sConn
    .CursorLocation = adUseClient
    .Open
  End With
  BuildProcs
End Sub

Open in new window


then you can populate sheet with data provided by sql server according to your needs

or you can use graphic tools like "external data" read here :
excel get data from a sql database
0
 

Author Comment

by:ZURINET
ID: 38810016
Hi sognoct

Thanks for your reply
But some how you did not understand my question..

I am working on a solution..
Where by I periodically export the needed data as csv. file to the local folder
Then I manually Import the the csv. file into excel
0
 
LVL 3

Assisted Solution

by:JuanchoVzla
JuanchoVzla earned 249 total points
ID: 38810248
Hi Zurinet,

I know it might be too obviuos, but have you tried a data connection?
Excel Data Connection
Hope it helps,

JC
0
 

Author Closing Comment

by:ZURINET
ID: 38909110
Had a work around
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Know what services you can and cannot, should and should not combine on your server.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question