Manipulate Visual Studio from Excel or Word

You can use automation to manipulate various applications, like Word, Excel, Visual Studio, Visual FoxProAutomation can make many tasks easier, including testing.You can imagine something like a Word macro that launches Excel to create a concordance of the words in the current Document. https://blogs.msdn.microsoft.com/calvin_hsia/2016/02/26/create-a-concordance-for-a-word-document-from-c-using-automation/ You can explore the Excel “Developer” menu by enabling it:File->Options->Customize Ribbon->Check…

0

Use C++ to show memory use in an Excel Pivot table

(apologies for the formatting: The MSDN blog infrastructure has changed and some tools aren’t working yet) The CComDispatchDriver class is very useful, but it doesn’t work too well with Excel. It makes it easier to call many Automation interfaces (IDispatch). PropertyGet and PropertyPut, Invoke Method You can see the typedef of CComDispatchDriver in typedef CComQIPtr<IDispatch,…

0

Create a Concordance for a Word Document from C# using Automation

I was talking to my son about some of his homework assignments. He had to write several essays. We talked about the power of Microsoft Word and how I had to count the words manually when writing a 5000 word essay on a typewriter, but Word shows the word count easily. Then we talked about…

1

Export your data to Excel using CSV and all data appears in one column

In many prior posts, I export data to Excel via writing to a TEMP file and just starting that TEMP file, which starts Excel, if Excel is on the machine.   var tempFileName = System.IO.Path.ChangeExtension( System.IO.Path.GetTempFileName(), "csv"); System.IO.File.WriteAllText( tempFileName, SomeText); If the format of the output is comma delimited, with the first row having column…

0