excel

Excel VBA: Long Execution Time

不打扰是莪最后的温柔 提交于 2021-02-08 10:12:03
问题 I've created a VBA code to delete extra rows and columns that were needed for initial calculations but are required to be removed before converting/importing a csv into a database. The code loops through 21 sheets and runs for about 4 minutes. Is this a decent run time or can it be shortened? ~Thanks Public Sub Test() Dim xWs As Worksheet Set xWs = ActiveSheet Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long 'SETTING DEPENDENT VALUES TO

How to make the Combobox item list dynamic?

独自空忆成欢 提交于 2021-02-08 10:10:46
问题 I am using a 'Generate' button on my worksheet. When I click on the button, a popup (form) come, which contains two comboboxes. Basis the selection in the first combobox, the second combobox option list is populated. For the first combobox, when I hardcode the item values it works fine. The form code is as follows: Private Sub UserForm_Initialize() With ComboBox_DL .AddItem "DL1" .AddItem "DL2" End With End Sub I tried to make this item list dynamic by fetching the combobox item values from a

PowerQuery table refresh stops with an error

自古美人都是妖i 提交于 2021-02-08 10:00:34
问题 I have experienced several time situation where using power query and refreshing large table (~300K rows) it stops loading rows with an error: Error Message: The MashupResource's PageReader is not available. Stack Trace: System.InvalidOperationException: The MashupResource's PageReader is not available. at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.GetSchemaInfo() at Microsoft.Mashup.Client.Excel.FillManager.RefreshFillSession.CompleteRefresh(IWorkbook workbook, Boolean

ALASQL - Excel from Json- Styling in multiple sheets

末鹿安然 提交于 2021-02-08 09:55:14
问题 I am trying to use alasql to download excel file having json data, and it works quite effectively, but I am stuck in a scenario where I need help. Scenario - I have an array of 2 json objects and I want to download 1 excel sheet with two tabs each for 1 object, that works effectively, but I want to add some styling to it, but if I try to add styling using options then it fails and the excel shows different output having [object object] format. Whereas if I try the same styling with one data

How to make dynamic drop down list?

本小妞迷上赌 提交于 2021-02-08 09:51:05
问题 I'm trying create dynamic drop down list in MS Excel O365. I've made 2 tables in 2 different sheets. In below are table in "Workers" sheet: And in "Order_status" sheet: As for as these tables are concerned i inserted that data manualy. Now i'd like create dynamic drop down which in "ID_Worker" i get data from "Workers" sheet and when i select ID_WORKER in "Order_status" sheet: a) not only displays ID_WORKER, FNAME, LNAME (For example 1 Paul Boy) b) Automatically writes data into ID_WORKER,

How to generate aggregations like sum, average at row labels instead of column labels in excel pivot table using apache poi?

不想你离开。 提交于 2021-02-08 09:38:07
问题 I am trying to produce an excel pivot table using apache-poi library. Base data What I want When i try to add multiple aggregations, excel was grouping it into values (you can see the values attribute in right side of 2nd image in row labels) and placing values in columns. I want to generate an excel with values in the row labels by default. But when i add multiple aggregations like sum and average(as shown in the below image), the values are shown in column labels. values can be dragged to

Open directly a web page from a button in Ribbon in a browser outside Excel?

泄露秘密 提交于 2021-02-08 09:36:26
问题 We have several Excel add-ins in AppSource. At the moment, we have a button in Ribbon for Documentation , clicking on the button opens the documentation webpage in a taskpane in Excel. We feel that as the taskpane is small, people are unlikely to read documentation over there. So a better way would be to open the documentation webpage in a browser outside Excel. We notice that in Script Lab, clicking on the Reference Docs opens a small window which contains open link in new window . Then, we

ListBox Form Control Scrolling

久未见 提交于 2021-02-08 09:36:05
问题 I've been doing a ton of research and I'm finally giving in and hoping the community can help. I have a FORM CONTROL list box, not an active x. I'm intentionally using form control for a variety of reasons that are not necessarily important (unless you can guide me how to 100% ensure activeX controls don't resize themselves on workbook open). I cannot, for the life of me, figure out how to get the form control list box to scroll to the selected value and put it in view. Here is what I have:

VBA to update formula when a value changes in a refence range

◇◆丶佛笑我妖孽 提交于 2021-02-08 09:29:50
问题 I have an Excel formula that gives me the last Friday's date "=TODAY()-WEEKDAY(TODAY())-1" in cell A1 I want to update cell A1 only when the values in reference range in another worksheet B2:D469 changes. Below is the code i am using but the issue is code only works when i manually make a change in the range. However values in the range gets updated when source pivot table refresh. I want code to get updated when i refresh the pivot table and the values in the range "B2:D469" changes. Private

How do I add information to an excel sheet without deleting the rest in Python?

て烟熏妆下的殇ゞ 提交于 2021-02-08 09:18:22
问题 Problem I need to make a python script that can export information to excel sheet without deleting sheets old information or sheets. See Pseudocode Context: This function is to be used in conjunction with a web scraper. And should hopefully, be able to extend data to an existing sheet, create a new sheet, and create a new file. With the help of other questions, I have come really close: How to save a new sheet in an existing excel file, using Pandas? But I want the possibility to extend on