excel

Excel VBA and HTML DOM: Can't Click Tab

无人久伴 提交于 2021-01-29 17:29:00
问题 In Excel 2003 VBA, I'm trying to browse to this web page... https://www.google.com/finance?q=NYSE%3AWSO&fstype=ii&ei=cy30UrCEI8KKiALOPw ...and click these two tabs on it: - "Balance Sheet" - "Annual Data" Here's what the HTML for those tabs looks like: <a class=t><b class=t><b class=t>Balance Sheet</b></b></a> and <a id=annual class="id-annual nac">Annual Data</a> Finding Annual Data with getElementById, and clicking on it, worked fine. But Balance Sheet has no ID. Using getElementByClass

Web scraping without specified name, id, or class attached to the data

一笑奈何 提交于 2021-01-29 17:27:24
问题 I am trying to track the status of shipping delivery and display it on an Excel tab. This website https://webcsw.ocs.co.jp/csw/ECSWG0201R00003P.do, displays data when the "Air wayBill No." is entered. I managed to open Internet Explorer, enter the Air WayBill number, then click the search button. Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") IE.Navigate "https://webcsw.ocs.co.jp/csw/ECSWG0201R00000P.do" IE.Visible = True While IE.busy DoEvents Wend Set document = IE

Excel Return Array if condition is true

泄露秘密 提交于 2021-01-29 17:16:48
问题 I am trying to get something of the effect that when I have an if statement: if({TRUE;FALSE;TRUE},{1,2,3}) it will return with {1,3} is there any way to get this effect with an array of conditions and return an array of results? 回答1: If one has the Dynamic Array Formula FILTER: =FILTER({1,2,3},TRANSPOSE({TRUE;FALSE;TRUE})) Without dynamic Array formula: =TRANSPOSE(MODE.MULT(IF({TRUE;FALSE;TRUE},ROW(1:3)*{1,1}))) This is an array formula and depending on ones version, it may need to be

Send email with all valued copied from sheet and pasted on email body

我与影子孤独终老i 提交于 2021-01-29 17:12:43
问题 Hi i have a training workbook whereby a lot training records in the file and with the help from others helped me put the codes together and i have merged both code and played around and i am stuck now whereby it will copy all blanks rows and previous expiry date too. but i want only to be copied and pasted on email if due date has been met and it was not sent in past and for those only new dates. i have uploaded an sample book. please help me finish of the code. i want training due dates to

excel 2016 combine subtotal with sumifs

强颜欢笑 提交于 2021-01-29 17:11:36
问题 My SUMIFS needs to add up column D (D11:D172) and the first criteria is a range called qbplistcomp (which is column B so B11:B172) for multiple hits (e.g. CHF, COPD, and all STROKE so using STROKE*) and the second criteria is in column C (C11:C172) looking for the criteria which is a label "qbp volumes" ... so far without subtotaling, this formula works as: =SUM(SUMIFS(D11:D172,qbplistcomp,{"CHF","COPD","STROKE*"},C11:C172,"QBP Volumes")) Now my column A has the ability to filter on Category,

VBA - What's The XPath Syntax To Get Tag Names

穿精又带淫゛_ 提交于 2021-01-29 17:10:37
问题 I am trying to use a VBA macro to parse XML file. Given with the following structure: <bookstore> <book category="children"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title>Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> How can I enumerate the output with element tags with its corresponding values as shown below? book | category | children title

Run Excel Macro from Access macro in VBA

陌路散爱 提交于 2021-01-29 17:09:20
问题 I am trying to run an excel macro from access 2016. This has a lot of examples out their however they are all old. The exact error code I receive is run-time error '1004': cannot run the macro "TestScript()". The macro may not be available in this workbook or all macros may be displayed. I am only running something easy for the test. I have ensured that macros is enabled in excel. the excel code is as follows Public Sub TestScript() MsgBox "IT WORKED" End Sub Real simple for the test. Access

Openpyxl - Transfer range of rows from a worksheet to another

守給你的承諾、 提交于 2021-01-29 17:03:25
问题 I want to take a certain part of data from a sheet and copy it to another sheet. So far, I have a dictionary with key as start row and value as end row. Using this, I would like to do the following: -Get the first range from sheet0 and append it to sheet1 -Get the second range from sheet0 and append it to sheet2 -Get the third range from sheet0 and append it to sheet3 I tried the following: #First range starts at 1 and ends at 34, second range from 34-52 and third from 52-75 myDict = {1: 34,

Bing scraper navigation

一笑奈何 提交于 2021-01-29 16:56:01
问题 My code all of a sudden does not seem to want to work and I can not work out why. Most of it is fine, there are only two issue with it now and I can not work them out. I was trying to improve it and may have moved someting around and can not work out what I have done. I need a some one to look at this for me please. I have highlighted the issue in the code that are the problem. The bulk of this is fine and I am happy with it. It no longer clicks on the next page in Bing It Loops minus 2, so

How get list of available page size in combobox and change size

孤街醉人 提交于 2021-01-29 16:50:57
问题 i am trying to get list of all available page sizes in combobox as dropdown with vba. when user select the size, i need to change the worksheet size accordingly. also in another combobox i need to populate width and height of that paper size when page size in combobox is selected. I tried something like. Dim i As integer for i = 1 to 30 activesheet.combobox1.value = Activesheet.PageSetup.Papersize(i) next i Thanks 回答1: here's a solution based on This link ActiveSheet.ComboBox1.List =