automation

How to get the current open documents in Excel using C#?

天大地大妈咪最大 提交于 2019-12-21 05:22:09
问题 All I need is to get the list of currently open documents in the currently open instance of Microsoft Excel. But I don't know Excel terminology to know if these documents are called workbooks, or sheets, or windows, etc. Any ideas 回答1: Found it (link). //Excel Application Object Microsoft.Office.Interop.Excel.Application oExcelApp; this.Activate ( ); //Get reference to Excel.Application from the ROT. oExcelApp = ( Microsoft.Office.Interop.Excel.Application ) System.Runtime.InteropServices

“Attach to Process” as a post-build event

一个人想着一个人 提交于 2019-12-21 04:38:13
问题 I have an application that runs hosted under the "w3wp.exe" process. While debugging, I often find myself following these steps: 1 - Make some change 2 - Build the project 3 - Attach to "w3wp.exe" using the "attach to process" dialog under the Tools menu. 4 - Perform some action in the application to make my code execute, so I can step through it in the debugger I'd like to automate step 3 in the post-build script, so that the IDE automatically attaches to the process after the build is

Perform XSLT Transform as Build-Step

自作多情 提交于 2019-12-21 03:36:33
问题 During a Visual Studio build, I need to have an XML file generated from another XML file. It is obvious to me an XSLT template and transform is exactly what I need. The way I prefer to accomplish this is to use the "Custom Tool" property found on project files. Is there already a built-in tool I can use for this purpose? My next option might be to use a pre-build step of the csproj. Again, is there a (Visual Studio or MSBUILD) pre-existing or pre-installed tool that I can invoke from a pre

using C# and UI Automation to grab contents of unknown control-type

送分小仙女□ 提交于 2019-12-21 02:46:09
问题 In the image below there is an area, which has an unknown (custom) class. That's not a Grid or a Table. I need to be able: to select Rows in this area to grab a Value from each cell The problem is since that's not a common type element - I have no idea how to google this problem or solve it myself. So far the code is following: Process[] proc = Process.GetProcessesByName("programname"); AutomationElement window = AutomationElement.FromHandle(proc [0].MainWindowHandle); PropertyCondition

What do you use to deploy your Web Applications? [closed]

点点圈 提交于 2019-12-21 02:34:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . We're looking to automate our deployment of Web Applications, particularly when going from local development to a remote server. Our

Is it possible to change the automatic configuration script address in the LAN settings of Internet Explorer 8 with the help of a script?

耗尽温柔 提交于 2019-12-21 02:00:48
问题 I use 2 different automatic configuration script addresses in the LAN settings of Internet Explorer 8. During the course of my work, I need to switch between them very often. Every time I have to do it manually. Is there a way I can automate it through a script or something, so that I can switch between them whenever I want? 回答1: You can use the following commands in a batch file (.bat file) Use of batch files relieves you from making so many UI clicks to perform a simple task of assigning a

Is it possible to change the automatic configuration script address in the LAN settings of Internet Explorer 8 with the help of a script?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 02:00:15
问题 I use 2 different automatic configuration script addresses in the LAN settings of Internet Explorer 8. During the course of my work, I need to switch between them very often. Every time I have to do it manually. Is there a way I can automate it through a script or something, so that I can switch between them whenever I want? 回答1: You can use the following commands in a batch file (.bat file) Use of batch files relieves you from making so many UI clicks to perform a simple task of assigning a

If I compile a VB6 app on win7, ADODB.Connection errors with “Class does not support Automation or does not support expected interface”

老子叫甜甜 提交于 2019-12-20 17:27:07
问题 I compiled some VB6 code on my Win7 x64 machine and the result .exe will not run correctly on any other machine. VB6 code is just a new template .exe file with one button, a reference to "Microsoft ActiveX Data Objects 2.6 Library" and the following code in the button press event: Dim db Set db = New ADODB.Connection It runs correctly on my machine, but no others (even other Win7 x64 machines) (Update: I found TWO other users where it runs and one of them is Jeff Atwood!, but most machines

Why are there no Makefiles for automation in Python projects?

孤街醉人 提交于 2019-12-20 16:17:08
问题 As a long time Python programmer, I wonder, if a central aspect of Python culture eluded me a long time: What do we do instead of Makefiles? Most ruby-projects I've seen (not just rails) use Rake , shortly after node.js became popular, there was cake . In many other (compiled and non-compiled) languages there are classic Make files. But in Python, no one seems to need such infrastructure. I randomly picked Python projects on GitHub, and they had no automation, besides the installation,

Upload a file to a Gist with bash

别说谁变了你拦得住时间么 提交于 2019-12-20 09:47:13
问题 I usually paste error reports and logs on Gist at Github, to exchange programming relevant debug information. Gist doesn't have a button to upload a file. So sometimes it is not so convenient to copy and paste your large errorreports into gists textarea for input. Is there a way to upload a file from the commandline into a new Gist in your Gist account? also creating a temporary git repository for the file to upload would help, I would automate this in a script then. In the end I would like