excel-2010

How can I automate the download dialog box in IE using VBA?

Deadly 提交于 2019-12-04 06:47:47
问题 I'm completely new on here and have only been using VBA for about 6 months. Needless to say, forum posts on here and a few other places have helped me immensely so far. I'm trying to develop a script to take data from Morningstar and copy it in to excel (note this is for my personal non-commercial use). I'm confident that I can code most of the required VBA but am stuck on automating the selection of "save" when the IE download dialog box pops up. I've seen a few related posts but nothing I

VBA Excel Macro To Update List Via External File

萝らか妹 提交于 2019-12-04 06:39:45
问题 I have an excel sheet that has two sheets. One sheet is hidden that has a list of values called "Location." On the main sheet I have created a drop down menu that pulls from the hidden sheet. How can I store these values in an external file (Excel, .txt, etc.) so I can hit a macro button (VBA) that will replace/update the list on the hidden sheet with any/all new Location values that will be stored in an external file? 回答1: I believe this is what you are looking for: Dim intPointer as Integer

Prevent Excel from reformatting text in the scientific notation [closed]

天大地大妈咪最大 提交于 2019-12-04 05:27:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a PHP script which exports data from database to different formats, including as an Excel document. If a text field contains such a value as 123123123123 , Excel, by default converts it to 1.23123E+11 . Is it possible to prevent this absolutely unnecessary behaviour? 回答1: If your goal is to store the

How to reference Excel table column names in XLWings?

孤人 提交于 2019-12-04 05:24:46
问题 Does XLWings allow my to interact with Excel tables (available in Excel 2007 and later via menu or ctrl+t) by table and column names? This does exist in the young, open sourceproject, Pyvot (https://pypi.python.org/pypi/Pyvot). I am hopeful that it is possible in XLWings now or that XLWings will add the functionality, Especially since this open source project is available as a model. Here is an example from https://pythonhosted.org/Pyvot/tutorial.html. "Pyvot specifically recognizes column

Merge elements when exporting to XML

十年热恋 提交于 2019-12-04 05:14:41
问题 I'm trying to export a table in Excel to an XML file. I created a schema but I don’t have exactly the result I expect. Here is a simple example of my table: my table. My schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="list"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="2"> <xs:element name="Group" type="groupType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> <xs

Filter table in excel VBA based on a column of values

大憨熊 提交于 2019-12-04 05:10:54
I have a table and I would like to filter the rows by the values in one of its columns. The values used to filter are stored in a separate column not in the table. This is what I have so far: Dim table1 As ListObject Dim range1 As Range Set range1 = ActiveSheet.range("AM23:AM184") 'get table object table1.range.AutoFilter Field:=3, Criteria1:=??? I do not know what to put for criteria1. I know it needs to be an Array and I can set it to something like Array("12","2","13") but what I need it to equal is the values specified in the range given by range1. Any help would be greatly appreciated.

Excel Exact Word Matching

戏子无情 提交于 2019-12-04 04:48:53
问题 Let's say I have "Vegas is great" in cell A1. I want to write a formula that looks for the exact word, "gas" in cells. Vegas ≠ gas, but the only search formula I'm finding: =ISNUMBER(SEARCH("gas",lower(A1)) returns true. Is there anyway to do do exact matching? I'd ideally like it to be non-case sensitive which I believe is satisfied by wrapping A1 in lower(). 回答1: I believe to correctly cover cases you have to pad spaces before and after the term "gas" and the search term. This will ensure

Use Range Find Method in a specific column

隐身守侯 提交于 2019-12-04 04:42:54
问题 I have been tinkering with this for a while now, I have the below code working but it searches more than I would like it to. I would like it to just search column C and not the entire sheet. I have tried changing out the Cells.Find to Range("C1:C10000").Find but it returns no matches. Really stumped on this one. Dim r As Range Set r = Sheets("State Agent List").Range("C1:C10000").Find(What:=ComboBox22.Value, _ After:=ActiveCell, LookAt:=xlPart, SearchOrder:=xlByRows) If Not r Is Nothing Then

Calculate Percentile in Excel 2010

若如初见. 提交于 2019-12-04 04:27:34
问题 This is my below list. I am trying to calculate 95% of calls came back in how many millseconds. Milliseconds Number of Calls 45 14 46 33 47 40 48 41 49 83 50 114 51 124 52 82 53 89 54 99 55 82 56 72 57 80 58 101 59 73 60 74 61 81 62 64 63 70 64 61 What does above data means is- 14 calls came back in 45 milliseconds 33 calls came back in 46 milliseconds 40 calls came back in 47 milliseconds etc etc Now I am supposed to find out 95% percentile from the above data. Meaning 95% of time, calls

Set Rows to repeat at top when printing - Open XML and Excel

不想你离开。 提交于 2019-12-04 04:19:18
问题 I am trying to get the first 4 rows of an xlsx file to repeat at the top of each page when printed. I am using the Open XML SDK to accomplish this. My file is being generated by the SSRS execution web service as a filestream. I then need to modify several layout and page settings (margins, page size, zoom, etc) before delivering the file to the user, as my users have very little Excel acumen. All other settings I need to tweak are working correctly, so I have stripped out all of that code