excel-2010

org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save

陌路散爱 提交于 2019-11-28 03:47:55
问题 I'm facing org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save:an error occurs while saving the package : The part /docProps/app.xml fail to be saved in the stream with marshaller <br/> org.apache.poi.openxml4j.opc.internal.marshallers.DefaultMarshaller@7c81475b Exception when try to write the each test scenario result(PASS or FAIL) into Excel sheet(.xlsx) after the each test scenario execution completion. I write the following two different modules for this purpose.

Conditional formatting, entire row based

北城以北 提交于 2019-11-28 02:58:42
I've searched and read through answers related to conditional formatting, but I can't seem to get mine to work, so maybe I'm doing something wrong. I have a worksheet for work. It contains a list of animals in our shelter. What I'm attempting to do is color the entire row green if they've been adopted (noted by an "X" in column "G"). I've had =$G$2="X" and =$G2="X" , but neither work. It'll only color the one row that was active when I set the rule, and when I enter "X" in another row, it does nothing. What am I missing? Ryan T =$G1="X" would be the correct (and easiest) method. Just select

Closing a Userform with Unload Me doesn't work

馋奶兔 提交于 2019-11-28 02:28:40
问题 I need to close an Excel userform using VBA when a user has clicked a submit button and operations have been carried out. How can I close a Userform from itself? I have tried this but it returns a 361 error. Unload Me 回答1: As specified by the top answer, I used the following in the code behind the button control. Private Sub btnClose_Click() Unload Me End Sub In doing so, it will not attempt to unload a control, but rather will unload the user form where the button control resides. The "Me"

how to split one column into two columns base on conditions in EXCEL

别说谁变了你拦得住时间么 提交于 2019-11-28 02:27:16
I am very new to Excel. Please help Column1 A,1 B,2 C,1 D,2 E,1 output: Column2 Column3 A,1 B,2 C,1 D,2 E,1 what is the formula to do this? Thanks! Assuming your data (" A,1 , etc.") spans cells A1:A50, then: Cell B1: =INDEX($A$1:$A$50,ROW()*2-1,1) Cell C1: =INDEX($A$1:$A$50,ROW()*2,1) Then you can copy the formulas to cells below, as far as needed. These formulas "redistribute" your cells contents between the two columns, regardless of the text itself. You can use an IF condition like this as well =IF(RIGHT(A2,1)="1",A2,"") in column 2 =IF(RIGHT(A2,1)="2",A2,"") in column 3 However cells

Excel VBA wildcard search

*爱你&永不变心* 提交于 2019-11-28 02:05:16
I currently have an Excel file with 1 column and many rows. The column holds a first name, last name, and possibly a middle name (EXAMPLE: John Abe Smith). I am writing a macro that has 1 textbox and 1 button. In the excel sheet I have a couple names: Column A -------- John Abe Smith Cindy Troll Bee Randy Row Joe Jumbo Katie Kool Kat I want to write a macro that when I type something in the textbox and click the button, it will look in this column for the name. If it finds it, then just say "found" in a message box. I want to use the wildcard "*" when searching the names, but I do not know how

Internet Explorer VBA Automation Error: The object Invoked has disconnected from its clients

倖福魔咒の 提交于 2019-11-28 01:14:09
问题 I'm trying to write code that will read a value from Excel, look it up in an internal web based system and store the results back in the Excel. It reads the Excel with no problem, opens Internet Explorer with no problem, but when I then try to reference what's been opened, I get the above error. The line "ie.Navigate url" works, but the next line "Set DOC = ie.Document" generates the error. Any ideas on what's causing this? Here's my code: Public Sub getClient() Dim xOpen As Boolean xOpen =

Error setting PlotArea.Width in Excel, VBA (Excel 2010)

孤街浪徒 提交于 2019-11-27 23:15:23
I am experiencing an error in a subroutine attempting to set the plotarea.width property of a chart. The other dimensions also cause this error if I comment out the preceding line(s). There is no ActiveChart, no selection, etc. The specific error message is this: "-2147467259 (80004005) Method 'Width' of object 'PlotArea' failed" This is stumping me for several reasons: In debug mode, F8 to step through the code the error does NOT occur. AFAIK "width" is not a "method" but a "property" of the chart's plotarea, so even the error message is rather ambiguous. Any thoughts? Here's as much code as

Use formula in custom calculated field in Pivot Table

試著忘記壹切 提交于 2019-11-27 21:44:52
问题 In Excel Pivot table report there is possibility for user intervention by inserting "Calculated Field" so that user can further manipulate the report. This seems like best approach compared to using formula on Pivot table data, outside the Pivot table, for many obvious reasons. "Calculated Field" dialog, looks like this: and while it's easy to do calculation between available variables (as shown in screenshot) I can't find how to reference range of values for any of available variables. For

automate submitting a post form that is on a website with vba and xmlhttp

穿精又带淫゛_ 提交于 2019-11-27 21:05:02
问题 I'm using xmlhttp via vba in excel 2010. I need to programmatically add an item to a shopping cart on a website. I have the code below so far, it uses the POST method A couple of things I think are wrong with my code but not sure how to fix - It doesn't show where the form is that is being submitted. Here is that url: http://www.craft-e-corner.com/p-2688-new-testament-cricut-cartridge.aspx The url I entered as the url that processes the form is the url in the "action=" part of "form". How can

Running multiple async queries with ADODB - callbacks not always firing

元气小坏坏 提交于 2019-11-27 20:46:57
I have an Excel workbook that fires three queries to a database to populate three tables on hidden sheets, and then runs three 'refresh' scripts to pull this data through to three visible presentation sheets (one per query). Running this synchronously is quite slow: The total time to refresh is the sum of the time of each of the three queries, plus the sum of the time for each 'refresh' script to run. I'm aware that VBA isn't multi-threaded, but I thought it would be possible to speed things up a bit by firing the queries off asynchronously (thus allowing some clean-up work to be done whilst