Solved

Access to SQL Database from Excel

Posted on 2013-01-22
4
228 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Know what services you can and cannot, should and should not combine on your server.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now