Working with multiple excel workbooks in python
Using win32com, I have two workbooks open. How do you know which one is active? How do you change which one is active? How can you close one and not the other? (not Application.Quit()) ...
Using win32com, I have two workbooks open. How do you know which one is active? How do you change which one is active? How can you close one and not the other? (not Application.Quit()) ...
How to effectively send a file from my own process to a program such as Photoshop, Word, Paint. I do not want to save the whole file to disk and then open the program from the startup parameters using CreateProcess, ShellExecute, etc. Maybe the only way out is Memory Maped Files? Maybe I should look to COM, IPC, Pipes? ...
Welcome, I'm exporting results of my script into Excel spreadsheet. Everything works fine, I put big sets of data into SpreadSheet, but sometimes an error occurs: File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 550, in __setattr__ self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, v...
Hi, We have a system that makes a use of 3rd party COM DLL written in vba We have a centralised web application and 1-50 client machines that must reference that COM DLL in order to use our centralised web application. The COM DLL is going to be updated rapidly in the future, which means that it has to be re-installed on every machine...
I want to have a static global std::unordered_map in the cpp of my entry point for my COM server. relevant header code: typedef unordered_map<HWND,IMyInterface*> MyMapType; relevant body: static MyMapType MyMap; void MyFunction(HWND hWnd, IMyInterface* pObj){ MyMap[hWnd] = pObj; } HINSTANCE g_hInstModule = NULL; BOOL WINAPI Dl...
Hi, I'm trying to create a excel RTD server in c++. it works fine to me. But when an error occurs, let say in ConnectData() (return value of this method indicates the successful method call to excel), I need to return an error string to user if RTD server is yet not ready. Please provide a suggestion on how to achieve this ? Thank yo...
Hello! I am currently on a project which has been buggy for a long while, now I suspect, among other things, that there is pointer errors in the code. The program is written in native C++ using COM and uses out-of-process COM servers. Can anybody give me some tips as how one would go about finding these errors? Is there specific th...
I'm trying to expose a fairly simple C# class to COM which should be usable from VBScript (among others). Some objects need to be created via COM calls and will be used in furter calls later on. The definition of the exposed classes and interfaces looks like this: namespace Test { [InterfaceType(ComInterfaceType.InterfaceIsIDispatch...
According to http://support.microsoft.com/kb/288902/en-us You can attach to a specific instance if you know the name of an open document in that instance. For example, if an instance of Excel is running with an open workbook named Book2, the following code attaches successfully to that instance even if it is not the ear...
We are currently working on an API for an existing system. It basically wraps some web-requests as an easy-to-use library that 3rd party companies should be able to use with our product. As part of the API, there is an event mechanism where the server can call back to the client via a constantly-running socket connection. To minimize ...
Hello, guys! Very important question: Please, look at my project (300Kb). I can`t use MFC/ATL, pure C++ only. I have COM library (niapi.dll), but no sources/headers available, dll only. There is class for connecting to server (NiApi::SrvrSession), class has login event handler (NiApi::SrvrSession::OnLogin). I used #import "NiApi.dll...
Hi! 10 years have ellapsed since I used COM/OLE, and I forget 90% of them. Now we need to make a COM object to access some data from PHP/Python (this is specific thing, the php ODBC don't access the output params of a DataBase - like stored proc output), and my idea the I realize a minimal object with one method, and PHP/Python can call...
How can I convert a "YYYY/MM/DD" formatted date to a VARIANT type date and vice-versa in C++? EDIT VARIANT VT_DATE Type passed by VBA code into an automation COM written in c++ ...
Context I am migrating an installer for an ActiveX control from Per-Machine to Per-User. I did this by programming the installer write to HKCU\Software\Classes instead of HKLM\Software\Classes. Problem On my machine (Windows 7 with UAC Enabled), the ActiveX control successfully loads. On the other windows 7 test machines (one with ...
Hello, how can I get calling convention at run time using type library ? whether stdcall,cdecl or winapi or any other? Regards Usman ...
I wrote a .net assembly using c# to perform functions that will be used by both managed and unmanaged code. I have a VB6 project that now needs to use the assembly via COM. I created my .net assembly, made sure that ComVisible is set to true and that it is registered for COM interop via project properties. public class MyClass [C...
Hey folks, I've been given a lump of code that has a ServicedComponent in it. I'm wrapping it up so that I don't have to expose the client code to yet another assembly dependency. The problem I'm having is injecting the connection string so that the Construct override will use the correct db. Any ideas? Thanks In Advance, Josh Robinso...
I have a COM object with a function with an optional last argument. The IDL is a bit like this: interface ICWhatever: IDispatch { [id(96)] HRESULT SomeFunction([in,defaultvalue(50.6)]float parameter); }; This works fine: if I don't specify the parameter, 50.6 is filled in. But in several development environments (Excel VBA, VB6) the...
I saw the post (http://stackoverflow.com/questions/1585878/adding-song-to-itunes-with-c-sdk-api) about this, but following the link couldn't find any solid help.. Could someone point me in the right direction? Thanks, Max ...
Hello, I want to know the types and details in a plain Win32DLL just like we can get in case of COM.In COM every thing embed inside idl and results in TLB, here we get every thing , MSFT exposes APIS by which we can extract types. In case of Win32 I strongly needed types defined in it and all details of that type(e.g what are members i...