excel-2013

xlwings Workbook() call returns AttributeError: Open.Application

倖福魔咒の 提交于 2019-12-11 10:43:54
问题 Hope you can help me out, first question I ask myself but I am always impressed by the professional answers I find here! I am using xlwings to both read and write data from .xls files. I am not a seasoned programmer, and I make mistakes. From time to time, this means rebooting processes, Python and what-not. Every now and again, I would get the following AttributeError upon calling Workbook() . The real problem is not that I don't have a clue what is happening (I tried reading the modules the

Automatic numbering in Excel with hierarchy

前提是你 提交于 2019-12-11 09:49:56
问题 I would like to do an automatic summary numbering. The only thing we could do is to number the A's (the titles) but the subtitles should be numbered automatically. If the title = 1, subtitle 1.1, below 1.1.1 and so on. Let's say the titles are A, B and C are subtibles. The pattern should be like this 1.A 1.1 B 1.2 B 2.A 2.1 B 2.1.1 C So I tried this : https://stackoverflow.com/a/32321112/7968011 What I get What we want What we want 回答1: If you have your Level Marker as "A" / "B" / "C" in

How to completely disable macros in the Excel 2013 C# Api

懵懂的女人 提交于 2019-12-11 08:15:09
问题 I have an application that uses Excel 2013. I need a way to disable all macros. I can not do it on workbook open because I do not have access to the open methods, the workbook is opened by another COM application then passed to me. It needs to happen prior to opening the document. What I am ultimately trying to do is set the setting found in the image below. 回答1: The best solution I found was to edit the registry. Shout out to Tim Williams for pointing me in the right direction The key that

DataTable DataColumn ColumnName not displaying

别来无恙 提交于 2019-12-11 08:03:42
问题 I am new to VSTO and am encountering an issue I can't seem to figure out. I am trying to display a simple table in Excel 2013 and everything populates, except the column display names come out to be "Column1, Column2, Column3". Here is my code: var worksheet = Globals.Sheet1; worksheet.Cells.Clear(); var table = new DataTable("Users"); // Set Columns var columns = new List<DataColumn> { new DataColumn("Staged") { ColumnName = "Staged", Caption = "Staged"}, new DataColumn("FirstName") {

excel - Copy values from table depending on value type

安稳与你 提交于 2019-12-11 07:33:47
问题 I have the following table in sheet1(Export): ----------------------------- | col1 | col2 |..cN..|ctr_type| ----------------------------- |value |value |valueN|CtrType1| ----------------------------- |value |value |valueN|CtrType2| ----------------------------- |value |value |valueN|CtrType3| ----------------------------- |value |value |valueN|CtrType1| ----------------------------- |value |value |valueN|CtrType3| ----------------------------- |value |value |valueN|CtrType2| -----------------

Find all values greater or equal than a certain value

时光怂恿深爱的人放手 提交于 2019-12-11 07:14:42
问题 Let's say I have the following table. Team Score AA 81 BB 67 CC 44 DD 1.5 JJ 279 LL 49 TT 201 GG 158 MM 32 HH 89 I want to get all teams that scored more than 80 in another table. I tried the Index + Match function as follows but it only gives me the smallest value greater than 80. Here is the code: =INDEX($A$2:$A$11,MATCH(80,$B$2:$B$11,-1)) Although I put the values in the lookup_array argument in descending order, this function only gives me one answer: The smallest value greater than 80. I

Fuzzy string matching optimization (not checking certain words) - Excel VBA function

陌路散爱 提交于 2019-12-11 06:22:19
问题 I have a function in Excel that calculates the Levenshtein Distance between two strings (the number of insertions, deletions, and/or substitutions needed to transform one string into another). I am using this as part of a project I'm working on that involves "fuzzy string matching." Below you will see the code for the LevenshteinDistance function and a valuePhrase function. The latter exists for the purposes of executing the function in my spreadsheet. I have taken this from what I read in

StatusBar and ScreenUpdate in Excel 2013

萝らか妹 提交于 2019-12-11 04:14:29
问题 I've just gotten into Excel 2013 and am noticing some differences in how macros work (because Microsoft can't leave a good thing alone). I've always used Application.ScreenUdpdating = False at the start of long macros to speed run time. Generally in those instances I've also used Application.StatusBar = "random text based on macro" to give myself (or other users) some sense of what's going on and/or how much work is left for the macro to complete. In 2013, I've learned (from Application

AutoFilter return correct result, but when SpecialCells(xlCellTypeVisible).value , excel only return half of the record

拈花ヽ惹草 提交于 2019-12-11 04:09:30
问题 this is my code openWs.AutoFilterMode = False Range("A1").AutoFilter Field:=1, Criteria1:= _ ">=" & date1, Operator:=xlAnd, Criteria2:="<=" & date2 Range("A1").AutoFilter Field:=4, VisibleDropDown:=False Range("A1").AutoFilter Field:=5, VisibleDropDown:=False Range("A1").AutoFilter Field:=6, VisibleDropDown:=False Range("A1").AutoFilter Field:=7, VisibleDropDown:=False Range("A1").AutoFilter Field:=8, VisibleDropDown:=False cnt = ActiveSheet.UsedRange.Rows.count arr() = openWs.Range("A2:H" &

Add radial lines to radar chart

时间秒杀一切 提交于 2019-12-11 03:04:53
问题 I'm using Office 2013 Excel and making a radar chart. By default the concentric rings are visible, but I want spokes or radial lines from the center to each category on the outside. I can't find out how to do this. 回答1: It seems to be a bug in Excel 2013 (and 2016). A workaround is: Create a radar chart. Change the chart type to one of the other two radar charts, for e.g. radar with markers. Change the chart type back to the original radar chart and format the Y axis to have lines. 回答2: These