querytable

  1. O

    How do I vary .TextFileColumnDataTypes array?

    Hi, I have found similar posts on this but not one with a solution. I'm trying to import a .csv file via a QueryTable but I want to vary the .TextFileColumnDataTypes so that a different array of column types are entered. With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\*****\" &...
  2. O

    RunTime Error 1004 Invalid Object Name when connection to SQL Server Database

    Hi, I've searched the forum and not found any posts reporting this problem. When running a QueryTable command in VBA I keep getting the error: RunTime Error 1004: Invalid object name: 'MyDatabase.Data.Amount_Source' What I cannot understand is that when I copy the SQL Query Command Text...
  3. N

    How do you refresh SQL data in Excel with VBA?

    I have a correctly connected query table on a worksheet called "SQL Data" that I can refresh manually no problem. However, when I run this VBA code I get the following error: Dim ws As Worksheet Set ws = Worksheets("SQL Data") 'Refresh the SQL Table ws.QueryTables(1).Refresh >>ERROR...
  4. J

    Incomplete Datasource Error when Queryinf Another Workbook

    I have the following VBA code which is failing with an "incomplete datasource" error on the last line: Application.ScreenUpdating = False Worksheets(Import).Select Range("F10").Select Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False The name of the ListObject is...
  5. L

    Changing queryTable name in 2007/2010 using VBA

    Since Excel 2007 querytables are part of a Listobject. I've been able to succesfully alter the CommandText and Connection property using VBA For Each ws In ActiveWorkbook.Sheets For Each lo In ws.ListObjects If lo.SourceType = XlListObjectSourceType.xlSrcQuery Then...
  6. O

    Download txt using QueryTables

    Hi all, I am trying to download a txt file using the following code. It is only downloading a few line of data and am not sure why. Any help is greatly appreciated. Thanks, O Sub Download() With Sheets(2).QueryTables.Add(Connection:="URL;http://www.asx.com.au/data/TheoPrices.txt"...
  7. J

    Querytables in Loop

    Hi, everyone. I want to download a list of the components of a stock Index from Yahoo! Finance (i.e.: http://finance.yahoo.com/q/cp?s=%5EIXIC+Components). In order to get the list in a .csv file, it is possible to get a web address, but it's limited to 50 records (i.e...
  8. K

    Import Text Files with VBA- How to set TextFilePlatform to a code page

    Hello I am writing a macro that changes the filepath for an existing text file import as a QueryTable. I want to set the connection parameters to variables and reapply them with a different filepath. Dim DataType() as Variant Dim Platform as Integer Dim TableCell As Range Dim...
  9. L

    HTML QueryTable Challenge

    I've been trying and trying to get this dang thing to run, but am at my wits end. Here is the file: https://sites.google.com/site/excelproblem001/ I am running a querytable on a loop of pages to collect a list of links and running a querytable on them. It will run fine and collect the data...
  10. M

    Querytable.connect can not load FoundFiles(i)

    Hi, I have a series of .txt files than need to be importing in order and processed in EXCEL. I'm trying to sort it first and then processed one by one. The problem is when I'm using .Foundfiles(i) in the QueryTable. connection to indicate the path, it pops up the window to let you select the...
  11. C

    how to Get historical price from this 2 websites to excel

    Hi, I really appreciate the excel spreadsheet "stockquotegrabber" for retrieving the stock data from yahoo. However, for the stocks I monitored which is in Hong Kong, such as 0005.HK, the stock data is always a few days behind today, so I would need to get it from other website. 1...
  12. B

    Write Values from ADO Connection

    Hi guys! first, sorry about my english =D i have a ADO Connection. My query is like this: select [C1] from [values$]It works, but my problem is to write this values. Why? Cause i work with my workbook open (not that from connection) and i have something like 55,000 rows to change value. A...
  13. V

    querytable error

    I have the following code the red color lines give error "unable to open.............". when I click ok in the error emssage and go further the higher size lines work and download the data for the period. what mistake am I doing in the codes above the line '------------ particularly red...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top