Solved

Access to SQL Database from Excel

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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

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