interop

Slicer connections does not show pivottable post change datasource

限于喜欢 提交于 2019-12-24 10:46:35
问题 I have two pivottables in two different sheets (Sheet1 and Sheet2) sourcing data from a common sheet (Sheet3). A slicer is created on the pivottable on Sheet1. If we go to report connections, we can see both pivottables in the list. Now I am dynamically changing the pivot data source for both the pivottables one by one. Only change is the range is extended to include the new rows copied by a different process. Once the code is executed, the report connections does not show both the

C# Interop format Validation List

妖精的绣舞 提交于 2019-12-24 09:17:30
问题 I implemented a code that adds Data Validation on cells from a specified range, but the values that contain , are chunked into pieces... This is my code var listFormats = new List<string>(); listFormats.Add("US punctuation + alphanumeric lowercase:[a-z0-9,.?;:!&()_'" + '"' + "]+"); listFormats.Add("US punctuation + alphanumeric uppercase:[A-Z0-9,.?;:!&()_'" + '"' + "]+"); listFormats.Add("US punctuation + alphanumeric mixedcase:[A-Za-z0-9,.?;:!&()_'" + '"' + "]+"); var flatListFormats =

Return byte array from C# to VBScript via COM interop

可紊 提交于 2019-12-24 08:57:22
问题 I have C# method that returns a byte array I want to be able to access from VBScript. More or less: namespace ClassLibrary7 { [ClassInterface(ClassInterfaceType.AutoDual)] [Guid("63A77D29-DB8C-4733-91B6-3CC9C2D1340E")] [ComVisible(true)] public class Class1 { public void Create( out byte[] BinaryData ) { // do some work and return BinaryData BinaryData = new byte[] { 1, 2, 3, 4 }; } } } and the vbscript to look like: dim o dim b set o = wscript.CreateObject("ClassLibrary7.Class1") o.Create b

Visio 2010 C# Entity Automation

ぃ、小莉子 提交于 2019-12-24 07:16:02
问题 I apologize if this was asked before, but after searching for some time, I could not find any specific answer on this. I have an ERD diagram in Visio 2010. It has around 15 tables or so. In order to have our DBAs create the database, I have to output each column to excel sheet with the data type, primary key, description. My first attempt was to simply copy and paste the column definitions table from the shape properties, but this does not work (thanks Microsoft!). After trying a few other

How to correctly marshal .NET Strings to std::wstrings for native code?

纵然是瞬间 提交于 2019-12-24 06:45:52
问题 I have a third party library which has a class where the constructor takes a std::wstring . The constructor is defined by the third party like this in the header file: Something(const std::wstring &theString); My header file has this: extern "C" __declspec(dllexport) ThirdParty::Something* createSomething(const std::wstring &theString); My implementation is like this: ThirdParty::Something* Bridge::createSomething(const std::wstring &theString) { return new ThirdParty::Something(theString); }

How to replace FileName in SaveFileDialog.FileOk event handler

二次信任 提交于 2019-12-24 06:43:59
问题 I'd like to change the file name of the SaveFileDialog in the event handler attached to the FileOk event, in order to replace the file name typed in by the user with another file name in some cases, while keeping the dialog open : var dialog = new SaveFileDialog(); ... dialog.FileOk += delegate (object sender, CancelEventArgs e) { if (dialog.FileName.EndsWith (".foo")) { dialog.FileName = "xyz.bar"; e.Cancel = true; } }; Stepping through the code shows that the FileName gets indeed properly

Automating Outlook and Word to create email message

房东的猫 提交于 2019-12-24 06:37:21
问题 I'm trying to create a Word email message that will be used as the body for an Outlook message. I've been looking at sample code from Microsoft here but this code falls over when trying to create the new word document at the wordApp.Documents.Add line: Word.Application wordApp = new Word.Application(); object template = System.Reflection.Missing.Value; object newTemplate = System.Reflection.Missing.Value; object documentType = Word.WdNewDocumentType.wdNewEmailMessage; object visible = false;

LLVM Interoperability (Like JVM or .Net) - Is it possible to do?

六眼飞鱼酱① 提交于 2019-12-24 05:26:09
问题 I recently played around a bit with different LLVM Frontends like Clang (C Familiy ), LDC2 (D), Terra, ... All these languages can be compiled into the LLVM IR (somewhat readable) and LLVM IR Bitcode . So at this stage they are all on the same "level" right? My Question is : Is there some way of language interoperability like the .NET Languages or JVM Languages on "language level" or is it only possible to do it by editing in the IR? I already looked this question up in Google but didn't find

What tools exist in Java that are equivalent to svcutil.exe for .NET?

我只是一个虾纸丫 提交于 2019-12-24 04:52:11
问题 What tools exist in Java that are equivalent to svcutil.exe for .NET? 回答1: It depends on what you are using svcutil for. To generate client code to access a web service, you would normally use wsimport. To generate a WDSL from server code, you would use wsgen. Note: There is absolutely no need to use AXIS to publish or consume SOAP based web services in Java, as the other answers seem to imply, unless you have some very specific requirements. Support for plain SOAP clients is included in the

Hosting ActiveX control in WPF

随声附和 提交于 2019-12-24 03:55:16
问题 I have an ActiveX control (written in Delphi) which I want to host in a WPF application. When I try to load it into the toolbox to add it to the XAML at design time, it is not shown in the list of available controls. Does anyone know what filters this list and why I can't see the control to add it? Edit This is where I get to - the host.Child = (ax); statement gets an error (Cannot implicitly convert type 'DemoFrameControl.DemoFrameCtrl' to 'System.Windows.Forms.Control'), hope this helps