Solved

Access to SQL Database from Excel

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

623 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