Speed Up Refresh Of External Data
Jun 29, 2009
I am having some issues using 'refresh all' to update my excel spreadsheet. Basically, it doens't seem to like doing anything greater than 65 queries before it gives me the error "Too many client tasks".
I've written a macro that updates all spreadsheets seperately, but this takes forever (I have approximately 250 worksheets within this workbook). Is there a way to speed this up? I believe the most time consuming part is establishing the connection to the access database. Is there a way to establish the connection to a database, and keep it open until all data has been updated?
Below is the code I am using:
Sub RefreshAll()
Dim e As Double
Dim sht As String
e = 1
Application.ScreenUpdating = False
Do
Sheets("All ESNs").Select
Cells(e, 1).Select
sht = ActiveCell.Value
Sheets(sht).Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("All ESNs").Select
e = e + 1
Loop Until IsEmpty(ActiveCell)
Application.ScreenUpdating = True
End Sub
"All ESNs" refers to a worksheet that contains a list of all serial numbers. These serial numbers correspond to the worksheet names.
View 9 Replies
ADVERTISEMENT
Oct 25, 2007
I am trying to set up a button that can be used to refresh data from an external source. The problem is that I'm not sure what to put in the area that I am using the "query" variable
Sub refresh_data(ByVal WS As Worksheet, query As String)
Application.DisplayAlerts = False
Sheets(WS).QueryTable(query).Refresh
Application.DisplayAlerts = True
End Sub
what i end up getting is an error saying basically that I am using incorrect data.
View 3 Replies
View Related
Apr 30, 2014
I am using an Excel file (Raw.xlsx) to store my raw data, and take another Excel file (Pivot.xlsx) to make PivotTable from Raw.xlsx
When generating the PivotTable, every works fine. When click [Refresh] in the Raw.xlsx, whatever changes been made in the Raw.xlsx can "sync" to the Pivot.xlsx
However, once I save and reopen the Pivot.xlsx, I can't refresh the PivotTable anymore. I've tried changing Data Source, but it doesn't work.
View 1 Replies
View Related
May 29, 2008
In the Data tab under Connection Properties, I have "Refresh every x minutes" checked. Question is how do I capture in a cell within a sheet the last time it was refreshed?
View 2 Replies
View Related
Dec 4, 2013
I have a pivot table report connected to an external data source (OLAP cube).I want to automatically refresh the pivot table report everytime the OLAP cube data changes.
I know we can use Automatic refresh on open of workbook or time intervals after which to refresh .But i want the auto refresh to work even if the workbook is already open and there is no definite time interval after which the cube is likely to change.SO,by defining intervals for auto refresh i do not intend to waste time refreshing even if there is no change.
There are multiple pivot table reports and pivot charts connected to the same OLAP cube.
View 1 Replies
View Related
Jul 9, 2014
I have an excel table that connects to an external sharepoint site.
When I refresh (via external data connection), the "start date" and "end date" column formats change. The only way I can correct this is to copy those columns to notepad, and then paste them back into the spreadsheet.
I have several calculated cells based upon these date fields. Once refreshed, the data is incorrect until I copy and paste those dates as stated above.
This removes the functionality of simply "refreshing" the data resulting in a manual process.
View 2 Replies
View Related
Apr 20, 2007
I have a spreadsheet which has 3 separate external queries running from worksheet 'A'. My user enters a couple of dates in another worksheet 'B' to supply the date parameters for the query and a macro runs to refresh all of the queries and performs a few calculations.This works fine. The trouble is I don't want the user to be able to view all the data on sheet 'A' only the summary on B. My macro ends up on sheet B but whilst the query is refreshing the raw data is displayed to the user on sheet 'A'. When I hide the sheet 'A' i get a run time error '1004' Select method of worksheet class failed.
View 4 Replies
View Related
Jul 27, 2006
i have an excel spreadsheet with 27 or so workeets. it contains sales figures in it.
I want to be able to link mutiple cells of this workbook to another workbook so that it retreives that data, So that when I hit the refresh (!) button it will automatically put the data in. I will recieve new sales figures (new files) on a monthly basis so i want it to be able to update the figures to the new figures.
View 4 Replies
View Related
Jan 4, 2008
I have a query with ODBC connection to a SQL database. This query's parameter is linked to a cell. The resultant data is the source for a pivot table. I want to refresh the pivot table, when the query is run. I've tried using the cell that triggers the query....but the problem is that the query takes about 10 seconds to run. By the time the query returns new data....the pivot has already refreshed. I need it to refresh AFTER the query is complete.
I tried adding a cell that sums up the data from the query...thinking when THAT changes (due to updated data), to trigger the pivot refresh. Problem is that I don't know the trigger for when the sum cell changes (ie....formula change, not typed in.)
View 9 Replies
View Related
Jan 24, 2013
I use drop down lists to speed up data entry. all my lists are on sheet 1 but my actual fields for selection are on sheet 2. I am trying to see if i can make the date fields columns drop down calenders. Sheet 2 is for a special import and i cannot add extra columns that are not a part of my import.. Is there a way to add drop down calenders or dates to sheet 2 without adding extra columns?
View 4 Replies
View Related
Jun 18, 2014
vba in excel 2013 pivot table that updates from an online CRM rows are a to h and it can be any number of rows. What I am trying to do is track progress. In column f values indicate probability for success 10 25 45 90, which can go up or down. The pivot table is refreshed to get the latest values from CRM. the update is handled by a connection to the crm not in the vba.
So far I been researching methods to conditionally format values that went up, down or remained the same since the last refresh with up down and across arrows. I have managed to piece together what I think should work but alas it is not. So I have come to you internet.
My code first clears any formatting and goes down the column avoiding null or empty cells, comparing the values in column f to values in column j.
I have 3 conditions greater than, less than or equal to, and would like add an icon for each based on the result of the comparison.
Finally when it finishes the column the code copies the current values in the pivot table column f to column j outside the pivot table which i hope to be able to hide once the cf works. The code is below
[Code] .....
View 1 Replies
View Related
Jul 9, 2014
An external data web query points to a web site that offers a foreign exchange rate calculator. In my browser, I selected the specific currency pair I need and used the resulting url in the web query. The "New Web Query" pane resolves the url correctly and allows me to select the table data I want (the little yellow arrow turns to a green check mark). However, when I hit "Import" and select the target cell, the only data returned is the parameters from the url and an error msg (This web query returned no data...). How do I get the query to pass the parameters to the website correctly?
View 3 Replies
View Related
Jul 8, 2014
I'm trying to make a spreadsheet that references data tables I have pulled from the internet, with the hopes that these tables will update as I refresh the data connections. I'm in the early stages of creating this spreadsheet right now, but whenever I try to refresh my data connections, it takes a tremendous amount of time. I have about 6 connections with 100 row lines total. Is this typical with data connections to the web? Is there a better way to do this?
View 1 Replies
View Related
Apr 27, 2013
i have to take the PGN chess game notation file into excel.it is a text file from notepad. it is like this as shown hereunder. how can i get this into columns movewise. ex.1.d4 Nf6 should come in A1 and 2.c4 d6 should come in A2.
1.d4 Nf6 2.c4 d6 3.Nf3 Nbd7 4.Nc3 e5 5.e4 Be7 6.Be2 O-O 7.O-O
c6 8.Qc2 Re8 9.Rd1 Bf8 10.Rb1 a5 11.d5 Nc5 12.Be3 Qc7 13.h3
Bd7 14.Rbc1 g6 15.Nd2 Rab8 16.Nb3 Nxb3 17.Qxb3 c5 18.Kh2 Kh8
19.Qc2 Ng8 20.Bg4 Nh6 21.Bxd7 Qxd7 22.Qd2 Ng8 23.g4 f5 24.f3
Be7 25.Rg1 Rf8 26.Rcf1 Rf7 27.gxf5 gxf5 28.Rg2 f4 29.Bf2 Rf6
30.Ne2 Qxh3+ 31.Kxh3 Rh6+ 32.Kg4 Nf6+ 33.Kf5 Nd7 34.Rg5 Rf8+
35.Kg4 Nf6+ 36.Kf5 Ng8+ 37.Kg4 Nf6+ 38.Kf5 Nxd5+ 39.Kg4 Nf6+
View 5 Replies
View Related
Jan 10, 2013
I am creating a tool that many people will be using. I need a way to do the following from vba:
1. Click on the "From Web" button under Get External Data section in Data and show the web query pop-up
2. Input the url into the field and press enter
At this point, it will be the user's responsibility to log in w/ their username and password. I have tried to record a macro w/ no success. I just need to get the query open for the user without them having to do anything.
View 2 Replies
View Related
Dec 3, 2008
I have some data in tabular form on a sheet. I want to represent this data on a different sheet, but have it be dynamically updated. I'm thinking that the smartest way would be to give the original data a named range, then do some sort of external data referencing to the source from Data - Import External Data. But this sounds kind of silly.
How do I do this? And no, I don't want to use pivot tables because I don't have statistics to populate in the cells...I just want to display the data as is.
View 9 Replies
View Related
Sep 26, 2013
I have a workbook with many worksheets and I want to enable (or disable) it to "Refresh every n minutes" for ALL worksheets, as at the moment it seems I can only specify this option per worksheet rather than the whole workbook?
View 1 Replies
View Related
May 11, 2006
I have an excel file with a link to an access database. when you open the excel file it prompts to refresh the data enable/disable. I select enable and the excel file is saved as a different file and the query reference in the new saved file is deleted (static version)
I have managed to write code to remove the database link from the new saved as file but what I still havent figured out is that the source excel file is refreshed automaticly when the script is running. I have set the database properties on automatic refresh on open which works if I activate manualy the file but with script down below, it does not refresh the data automaticly. What is the VB code to refresh the data in the source XLS file??
Sub main()
Dim prompt As Long
prompt = 200503
Dim objExcelApp As Object
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.displayalerts = False
objExcelApp.Workbooks.Open "c: emp est.xls" 'this file has the connection with the access database.
objExcelApp.Visible = True....................
View 6 Replies
View Related
Sep 27, 2006
This may be something very simple, but i have a table which collects varying data from different worksheets to finally calculate a Work in Progress result. Each line on the table consists of the same formula, and certain columns are used to changes %s which change the result.
When the data is changed, the formulas work through and update the new values with no problem until the last couple of columns. With these i am finding I have to copy and paste the formula back into the same place to refresh the data. The formula for those cells which causes the problem are:
Column X:
=IF(AE87="TRUE",(IF(G87>100,100,105)),(IF(AE87="Y",F87,(VLOOKUP(G87, lookup,2,FALSE)))))
Column Y;
=+W88*X88/100
Column Z;
=+U89-H89+Y89
Column AA and AB and AC:
No formulas
Column AD:
=AND(W87<0,X87>70)
Column AE:
=TEXT(AD87,1)
I have checked in the options and the calculation is set to automatic which I presume can cause these problems.
View 2 Replies
View Related
Feb 10, 2010
way to import the data from this link into an excel so that all the data will be listed in columns. IE: Association name, contact, advisor, etc....
So far I have not found an efficient way to do this through importing the data.
View 11 Replies
View Related
Oct 13, 2009
I have 5 or 6 macros set up to import stats from the internet to specific sheets. I want all of my imported data to be pasted starting at A1. However when i run these macros, the data IS pasted at A1, but when i run it a second time (or the next day after the pages have been updated), it pastes the data BESIDE the previously pasted stuff. here's what i mean..
say my imported data spans columns A to S.. everything's fine. but tomorrow i want to update the data so i run the macro again. well, it pastes the new data to A1 and again it spans from A to S like it's supposed to, but now it also tacks on the same paste job from S to, AG for instance.here's the code... There are currently 5 macros that have this problem. I thought by selecting A1 as the starting point, i could alleviate all of this but apparently not.
View 2 Replies
View Related
Dec 26, 2007
I'm trying to pull in data from another Excel workbook which gets updated on a regular basis. Using the Import External Data fucntion in Excel I created a query which pulls the data from the original workbook into a tab in the workbook I'm using. The issue I'm having is that not all of the column headers get pulled in when using the Import External Data function. I tried typing the column headers in myself but they disappear again after refreshing the data set. Any ideas what is causing the issue?
View 9 Replies
View Related
Apr 1, 2008
I use external data queries in excel. That's how I look up data in my access databases because I have so many access and SQL databases it's just eiser to be able to do quick queries on multiple databases at the same time in one spreadsheet. And, I can save the external data query as a tool to use in future queries. I have tons of tools and external data query is the foundation of most of them.
What bugs me is EDITING data.
If I want to do some light simple editing in an SQL database I am required to use a linked table in Access or SQL Studio Express Manager. Great programs, but I want to integrate!
Is there no way to make excel a database editor? I can retrieve data from any database or program with excel just fine, but is there a way to use excel to DIRECTLY EDIT the data in an external database with EXCEL like I can in access linked tables?
View 9 Replies
View Related
Jul 15, 2008
I am trying to import the data on the url below. When I go to the external data inport the page is loaded and I click the indicator to load the central table but when the data loads the page is severally corrupted. I have found this on a few pages but some pages load correctly.
View 9 Replies
View Related
Jul 18, 2008
I used to get data from external excel, access files and today tried to put together query to get data from CSV file. While using same source file, I have creted several queries to get data out based on criteria. For some strange reason, same structure queries that did run with excel or access as data source, does not want to work the same way with CSV files.
Here is example of non working query SQL:
SELECT Vendors.Vendor, Vendors.Name, Vendors.`Name 2`
FROM `Q:FinanceRapporterPSAPRaw`Vendors.csv Vendors
WHERE (Vendors.Name Like '%' & ? & '%')
If I enter "London" as a criteria input, it will not work. However, if I enter "ondon" it will find me all values records whre name contains London... Seems like I need to skip first symbol when entering criteria. This is, of course, not something I would like to do.
View 9 Replies
View Related
Apr 18, 2009
I’ve got a question regarding import of external data in excel. The workbook I am conceiving at the moment does have a database query from another excelfile(a report from my business system) via the standard Excel functionality and it works perfectly fine.
What I can’t figure out is how to re-direct my query to any file/path I choose.
At the moment I just replace my original file with a new freshly updated one but I am stuck with the original path and filename or else it won’t work.
View 9 Replies
View Related
Aug 6, 2009
I'm wondering if I can use external data in an excel spreadsheet without having to import all the data. I basically need a persistent connection with the external data and I want the excel spreadsheet to get the item descriptions by using the item number as the user types in the item number. Writing out the descriptions is killing me and I have all my products in an excel spreadsheet already. I really need someway to link two separate excel files together. One with data and one with user input that searches that data as I type in the item number.
View 2 Replies
View Related
May 3, 2013
I currently have a spreadsheet that has data connections to a file on a shared drive. On opening the file I have it update the data connections so that the data needed is always correct. The file I use is to be distributed out to work colleagues to use and on testing it works really well apart from if you have the file open and somebody tried to open the original file where the data is pulled from for the connection. It says it currently in use by 'another user'.
Is there any code to add to workbook_open that will close/disable the data connection links once the data has been updated? The code I currently have is this:
VB:
Private Sub Workbook_Open()
ActiveWorkbook.RefreshAll
Application.Wait Now + TimeValue("00:00:02")
Userform1.Show
End If
End Sub
What this basically does is gives it time to refresh the data connections and show a progress userform. The only thing is the connections stay live and I don't want that as the connection file is then locked. I'm hoping its something simple like ActiveWorkbook.CloseDataConnection added in after the userform has been shown (or something along them lines ). Also the data connections would have to be able to reconnect on open so that they can refresh again.
View 5 Replies
View Related
Aug 28, 2013
I'm using Excel 2010 to link a table to a XML file on my server. I'd like to distribute the Excel file to a group of people and have it updated every time the XML file is updated on the server.
In Excel, I'm pulling the data using "Data", "From Web" and then I type in the path of the XML file.
Excel then builds a table with all the data but if the XML file is updated on the server, the data remains static, even if I click "Refresh" or "Refresh XML data" on the table.
It should be able to download new data including new columns to the table, if any.
View 2 Replies
View Related
Sep 12, 2013
I have a report that uses external data to feed a Pivot Table.
I noticed that the data source had been turned off automatically by Excel and turned it on and added the file location to the trust centre.
I also set the data to refresh when the workbook is opened.
I saved the file and then tried to refresh the data which caused Excel to crash. Of course now I can't open the file either because when it attempts to refresh itself on opening that causes Excel to crash as well.
Addendum: I have removed the Trusted Location which has caused Excel to disable the connection again. This has solved the crash on opening but I still can't refresh the data.
View 3 Replies
View Related