LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default querytables.add..Invalid argument for URL connection type


I am trying to dynamically create a web query in an excel workbook project
and am getting an error whenever I try to use a connection of type URL;

Microsoft.Office.Interop.Excel.Range range = worksheet.get_Range("A1", "A1");
Microsoft.Office.Interop.Excel.QueryTable qTable =
worksheet.QueryTables.Add(@"URL;http://localhost/SampleReport", range, null);
qTable.Name = "Test Report";

I am used C# code and this works fine from a embedded VBA module. Why not
from a .NET managed excel workbook?

Any ideas?
 
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
R/T error 5 - invalid procedure or argument JMay Excel Programming 0 March 31st 09 01:57 AM
ComboBox List - Invalid Argument???? Minitman Excel Programming 6 June 1st 08 09:02 PM
Not working... Why? ActiveSheet.QueryTables.Add(Connection:=ActiveCell.Offset(0, [email protected] Excel Programming 2 March 27th 08 06:45 AM
QueryTables.Add Connection Parameter Nirmal Singh Excel Programming 0 October 6th 05 11:52 AM
help with ActiveSheet.QueryTables.Add Connection: uriel78 Excel Programming 1 March 6th 05 04:08 PM


All times are GMT +1. The time now is 01:25 PM.

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

About Us

"It's about Microsoft Excel"