Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DJB DJB is offline
external usenet poster
 
Posts: 8
Default Web Services using vba

Is it possible to consume web services in Excel using vba or do you need to
use .NET?
--
djb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Web Services using vba


"djb" wrote in message
...
Is it possible to consume web services in Excel using vba or do you need

to
use .NET?
--
djb


Maybe. I wouldn't recommend it. I think you would need VB6 or .Net code that
in turn calls Excel. Microsoft has recommended against using Excel as a
server application. Can you please tell more about what you want to do?

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
DJB DJB is offline
external usenet poster
 
Posts: 8
Default Web Services using vba

Thanks for the reply. I used to be able to connect directly to a SQL Server
database and bring the data automatically into Excel but now I have to go
through a terminal server to access the data so I was hoping to create web
services to the data on the SQL Server and consume them in Excel.

"Fredrik Wahlgren" wrote:


"djb" wrote in message
...
Is it possible to consume web services in Excel using vba or do you need

to
use .NET?
--
djb


Maybe. I wouldn't recommend it. I think you would need VB6 or .Net code that
in turn calls Excel. Microsoft has recommended against using Excel as a
server application. Can you please tell more about what you want to do?

/Fredrik



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Web Services using vba

You should be able to use ADO

Dim strSQL1 As String
strConnect1 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=MyDatabase;Data Source=MyServer"
Dim cnn1 As ADODB.Connection
Set cnn1 = New ADODB.Connection
cnn1.Open strConnect1
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset

strSQL1 = "SELECT lastname, firstname FROM tbl_names "

rs1.Open strSQL1, cnn1, adOpenForwardOnly, adLockReadOnly
Do While rs1.EOF = False
do something here

rs1.MoveNext
Loop
rs1.Close
cnn1.Close

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"djb" wrote:
| Thanks for the reply. I used to be able to connect directly to a SQL
Server
| database and bring the data automatically into Excel but now I have to go
| through a terminal server to access the data so I was hoping to create web
| services to the data on the SQL Server and consume them in Excel.
|
| "Fredrik Wahlgren" wrote:
|
|
| "djb" wrote in message
| ...
| Is it possible to consume web services in Excel using vba or do you
need
| to
| use .NET?
| --
| djb
|
| Maybe. I wouldn't recommend it. I think you would need VB6 or .Net code
that
| in turn calls Excel. Microsoft has recommended against using Excel as a
| server application. Can you please tell more about what you want to do?
|
| /Fredrik
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Web Services using vba

Of course I forgot to;
Dim strConnect1 as String

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Web Services using vba

Dave's suggestion is probably waht you need. If you can create a connection
to your SQL server on your local computer, you won't need Citrix. In my
opinion, using ADO in vba will make it easy and flexible to get data. The
only problem could be the connection string. You can create an empty text
file and change the extension to udl if your PC is set to show them. The
icon will change. When you doubleclick on it, there will be a wizard that
helps you to build an connection.

You can either use the udl file in your code or change the extension to txt
which will reveal the connection string.

/Fredrik


"Dave Patrick" wrote in message
...
You should be able to use ADO

Dim strSQL1 As String
strConnect1 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=MyDatabase;Data Source=MyServer"
Dim cnn1 As ADODB.Connection
Set cnn1 = New ADODB.Connection
cnn1.Open strConnect1
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset

strSQL1 = "SELECT lastname, firstname FROM tbl_names "

rs1.Open strSQL1, cnn1, adOpenForwardOnly, adLockReadOnly
Do While rs1.EOF = False
do something here

rs1.MoveNext
Loop
rs1.Close
cnn1.Close

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"djb" wrote:
| Thanks for the reply. I used to be able to connect directly to a SQL
Server
| database and bring the data automatically into Excel but now I have to

go
| through a terminal server to access the data so I was hoping to create

web
| services to the data on the SQL Server and consume them in Excel.
|
| "Fredrik Wahlgren" wrote:
|
|
| "djb" wrote in message
| ...
| Is it possible to consume web services in Excel using vba or do you
need
| to
| use .NET?
| --
| djb
|
| Maybe. I wouldn't recommend it. I think you would need VB6 or .Net

code
that
| in turn calls Excel. Microsoft has recommended against using Excel as

a
| server application. Can you please tell more about what you want to

do?
|
| /Fredrik
|
|
|




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Web Services using vba

On the web service possibility here's an article in my last months issue of
MSDN though I've not tried any of it as yet.

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Fredrik Wahlgren" wrote:
| Dave's suggestion is probably waht you need. If you can create a
connection
| to your SQL server on your local computer, you won't need Citrix. In my
| opinion, using ADO in vba will make it easy and flexible to get data. The
| only problem could be the connection string. You can create an empty text
| file and change the extension to udl if your PC is set to show them. The
| icon will change. When you doubleclick on it, there will be a wizard that
| helps you to build an connection.
|
| You can either use the udl file in your code or change the extension to
txt
| which will reveal the connection string.
|
| /Fredrik


  #8   Report Post  
Posted to microsoft.public.excel.programming
DJB DJB is offline
external usenet poster
 
Posts: 8
Default Web Services using vba

This is the way I used to be able to connect but can no longer because I am
going through a terminal server that doesn't have Excel on the server so I
would have to have a way to send credentials, not only to the particular
database, but to log into terminal server and get the data back thru terminal
server...which I do not know if there is a way to do this. Thus..the reason I
was thinking it may be best to try to use a web service to connect to the
data through http.

djb

"Dave Patrick" wrote:

You should be able to use ADO

Dim strSQL1 As String
strConnect1 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=MyDatabase;Data Source=MyServer"
Dim cnn1 As ADODB.Connection
Set cnn1 = New ADODB.Connection
cnn1.Open strConnect1
Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset

strSQL1 = "SELECT lastname, firstname FROM tbl_names "

rs1.Open strSQL1, cnn1, adOpenForwardOnly, adLockReadOnly
Do While rs1.EOF = False
do something here

rs1.MoveNext
Loop
rs1.Close
cnn1.Close

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"djb" wrote:
| Thanks for the reply. I used to be able to connect directly to a SQL
Server
| database and bring the data automatically into Excel but now I have to go
| through a terminal server to access the data so I was hoping to create web
| services to the data on the SQL Server and consume them in Excel.
|
| "Fredrik Wahlgren" wrote:
|
|
| "djb" wrote in message
| ...
| Is it possible to consume web services in Excel using vba or do you
need
| to
| use .NET?
| --
| djb
|
| Maybe. I wouldn't recommend it. I think you would need VB6 or .Net code
that
| in turn calls Excel. Microsoft has recommended against using Excel as a
| server application. Can you please tell more about what you want to do?
|
| /Fredrik
|
|
|



  #9   Report Post  
Posted to microsoft.public.excel.programming
DJB DJB is offline
external usenet poster
 
Posts: 8
Default Web Services using vba

Dave, I think this article is exactly what I am looking for. Thanks so much
for your help and pointing me to this info!
djb

"Dave Patrick" wrote:

On the web service possibility here's an article in my last months issue of
MSDN though I've not tried any of it as yet.

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Fredrik Wahlgren" wrote:
| Dave's suggestion is probably waht you need. If you can create a
connection
| to your SQL server on your local computer, you won't need Citrix. In my
| opinion, using ADO in vba will make it easy and flexible to get data. The
| only problem could be the connection string. You can create an empty text
| file and change the extension to udl if your PC is set to show them. The
| icon will change. When you doubleclick on it, there will be a wizard that
| helps you to build an connection.
|
| You can either use the udl file in your code or change the extension to
txt
| which will reveal the connection string.
|
| /Fredrik



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Web Services using vba

Glad to hear it helps. You're welcome.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"djb" wrote:
| Dave, I think this article is exactly what I am looking for. Thanks so
much
| for your help and pointing me to this info!
| djb




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Web Services using vba


"djb" wrote in message
...
Is it possible to consume web services in Excel using vba or do you need

to
use .NET?
--
djb


Here's a link that I found which I think you will find useful
http://msdn.microsoft.com/library/de...ml/asp0193.asp

/Fredrik


  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Web Services using vba

There is an addin from MS for the vba-ide. Look for "Microsoft Office 2003
Web Services Toolkit für Visual Basic for Applications" (and XP) ...

--
Thomas

http://rtsoftwaredevelopment.de

"djb" schrieb im Newsbeitrag
...
Is it possible to consume web services in Excel using vba or do you need

to
use .NET?
--
djb



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Text Services to Counts of Services Mike S. Excel Discussion (Misc queries) 4 March 5th 07 06:51 PM
Add-In functions not available Analysis Services add-in. UBoatCaptain Excel Worksheet Functions 2 February 6th 07 07:54 PM
ACCOUNTING SERVICES CENTROL BUSINESS Excel Discussion (Misc queries) 1 January 15th 07 05:46 AM
Where did my Publish to Excel Services go? Mike L Setting up and Configuration of Excel 8 December 7th 06 10:46 AM
Export Services David Sherman Excel Discussion (Misc queries) 2 April 27th 06 05:24 PM


All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"