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.
I have bit of code that opens an external excel file (call it the source workbook), grabs certain data, copies the data to other excel file (call it the destination workbook), and then closes. I have most of the code completed but am running into an issue with how to grab certain data from the source workbook and copying it to destination workbook.
I want the code to read the data in the source workbook line-by-line.
For each line that is read, I want to copy part of that data (value in column A and column B) to column A and column B of destination workbook only if the value in column D is equal to “Block”. For column C and column D, I want to do some form of lookup, being I want the code to look at each line of data until it finds corresponding line in which column A = “60612105” and in which column B = the value in B. Once this line is found, copy the value in C to column C of destination workbook and value in D to column D of destination workbook.
I have attached two files. First file is the import file (destination workbook) which has two tabs; (1) import tab (2) desired result. Second file is the raw data file (source workbook). Hopefully this makes since.
I am importing external data to "Workbook A" from the source workbook, "Workbook B." Workbook A is set up to refresh every 15 minutes. Workbook B is shared. I am recieving an error saying either, the 'file is in use', or 'the file is locked,' depending on the senario.
Scenario 1: 1. I open A and enable data connections. 2. I try to open B, but receive the message: '(File location...) is in use. Try again later.
Scenario 2: 1. I open B. 2. I open A. 3. I go back to B to edit information. 4. When I try saving the information I get the following message: 'File is locked. Try the command again later.'
I need to be able to have A open and periodically refreshing. I also need to allow users unhindered access to B at the same time.
I'm having some issues importing external data from an Oracle 9i database. Here is what is happening:
I am initially able to import data from the table I want to into Excel. I do this through "Data -> Import External Data -> New Database Query" where I have my .ORA data source. I'm able to log in using my user and password and import the table. My problems come after I import this first set of data.
If I try to "Edit Query…" I get an error box that says "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
If I try to "Refresh Data" I get two error boxes. The first is just: "[Microsoft][ODBC driver for Oracle][Oracle]" and the next says: "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed". It then prompts me for the User name and password of the DB I'm connecting and after I enter the information, I get the same two error messages.
Also, if I attempt to establish another connection following the "Data -> Import External Data…" steps I run into a different problem. Upon entering the information for the User Name and password prompt I get two error messages. One says "!" and the next box says "Couldn't read this file". Once I click "OK" in those boxes, the Microsoft Query window automatically opens with nothing in it.
I can't seem to figure out why I can initially pull down data and then cannot succeed afterwards. I'm unable to connect to the DB I have through Excel until I completely closed all Microsoft Excel instances.
I also use this data source in Microsoft Access without any problems.
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?
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?
i have a script to import a workbook which works fine, but when the data is imported i would like to have all the data in the cells aligned to the left of the cells, as im new to vba i can work this out.
Below is the script i'm using to import.
I would like this to aligned all cells to the left and centered when imported.
Sub tst() With workbooks.open("C:example.xls") with .sheets(1).usedrange thisworkbook.sheets(1).cells(rows.count,1).end(xlup).offset(1).resize(.rows.count,columns.count)=.value end with .close False End with End Sub
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.
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.
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.
I want to import data from the web into Excel, but the data I want come from the result of a query - I have to enter a few parameters and get the results. I would like to import these results into Excel but although I can enter the website for Excel to look at I cannot figure out how I can enter the parameters to generate the results.
I am having a little trouble with this piece of simple code that just seems to be not working the way i want to. I can't figure why it won't work.
Private Sub CommandButton1_Click() Sheets("Global").Select Range("B5:F19").Copy Range("B25").PasteSpecial (xlPasteAll) Range("B5:E5").ClearContents Range("B7:E7").ClearContents Range("B11:E11").ClearContents Range("B13:F13").ClearContents Range("B17:D17").ClearContents Range("B19:D19").ClearContents End Sub
for some reason if i try to do Range("B5:F19").Select and then do Selection.Copy, I get an application error message. This has never happened before and for some reason it just started to act up. If you want to know what it does when I run this macro.. it actually doesn't go to Sheet "Global" it stays in the same sheet and does all the copying/pasting/clearing in the same sheet as the button is. I made sure that the tab is "Global" and i have confirmed caps. spaces everything.
I have been asked to develop a dashboard for my company. The data source for my dashboard is Tally ERP 9.The problem is I am not getting how to access this data into excel. I have tried MS Query but the imported data was not what I was expecting.
I have the following code that I cobbled together from various recordings of data imports and queries. The problem seems to be in my WHERE statment. I get a "Run-time error '1004': Data type mismatch in criteria expression."
I need to create an statement for my clients. Book A has all of the account balances. Still in book A, the account number is in column A, and balance is in column H. I just need to import from Book A into Book B, based on account number. Now on Book B, the account# is in column A and the balance needs to go to column B.
I am using Microsoft Excel 2003 and I am trying to import data from one worksheet to another. I found out how to import the data, but I can not find out how to get the data that I am importing to go into the labelled cells that I want them to go into. Is there any way that I can get Excel to do this, or am I searching for something that can't even happen?
have been trying to work out how to copy data from a website into a worksheet. For some reason the Data > Import External Data > New Web Query route does not work so I have tried the code below but cannot get this to work either.
What I am trying to achieve is to copy each of the various tables on the page into Excel.
Dim WebCopy As Object Dim WebtitleCopy As Object Set WebCopy = Sheets("Sheet2") WebCopy.Cells.Clear
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?
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?
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.
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.
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.
I need to import data from an Access table (which is straightforward enough), but there's a snag. All the rows are dated (10 rows per day) and I want to start from a specific date and get everything after that date.
Anyone any ideas if this is possible and, if so, how to do it?
I'm trying to import a data from a website using Microsoft Excel however the link is too long & when I do import data from web & I past the link in there, it says that it's too long and it won't let me.