Adventures with Excel and VBA
-
I needed to load some data in Excel from an external system, which you can interact with using a C++ DLL. First thing, I tried to import the DLL functions in VBA with no luck, because the runtime wasn't able to find some dependencies (which of course were all available :| ). Next, I tried to build a .NET wrapper for the C++ DLL, and tried to use COM Interop to register it as a COM object, still with no luck, because I never used COM in my life, so I couldn't even figure out the basics (although I've been able to register the library). I then decided to go quick and dirty. I wrote a program which outputs the needed data directly on a CSV file. In Excel I registered a macro for importing the external data from disk, and I also wrote a macro to launch the program and wait for the result. Well, it works, but I hate all of this naive stuff. :|
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Blog - My Photos - ScrewTurn Wiki
-
I needed to load some data in Excel from an external system, which you can interact with using a C++ DLL. First thing, I tried to import the DLL functions in VBA with no luck, because the runtime wasn't able to find some dependencies (which of course were all available :| ). Next, I tried to build a .NET wrapper for the C++ DLL, and tried to use COM Interop to register it as a COM object, still with no luck, because I never used COM in my life, so I couldn't even figure out the basics (although I've been able to register the library). I then decided to go quick and dirty. I wrote a program which outputs the needed data directly on a CSV file. In Excel I registered a macro for importing the external data from disk, and I also wrote a macro to launch the program and wait for the result. Well, it works, but I hate all of this naive stuff. :|
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Blog - My Photos - ScrewTurn Wiki
Dario Solera wrote:
Well, it works, but I hate all of this naive stuff.
Naive or native? ;)
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham My New Blog
-
I needed to load some data in Excel from an external system, which you can interact with using a C++ DLL. First thing, I tried to import the DLL functions in VBA with no luck, because the runtime wasn't able to find some dependencies (which of course were all available :| ). Next, I tried to build a .NET wrapper for the C++ DLL, and tried to use COM Interop to register it as a COM object, still with no luck, because I never used COM in my life, so I couldn't even figure out the basics (although I've been able to register the library). I then decided to go quick and dirty. I wrote a program which outputs the needed data directly on a CSV file. In Excel I registered a macro for importing the external data from disk, and I also wrote a macro to launch the program and wait for the result. Well, it works, but I hate all of this naive stuff. :|
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Blog - My Photos - ScrewTurn Wiki
-
I think you better run to the correct forum before the wolfs get here. ;) ( Edit: There does not seem to be any question there though, so i take it back :) )
/M
- Don't sweat the petty things, and don't pet the sweaty things.
loket wrote:
( Edit: There does not seem to be any question there though, so i take it back )
I avoided even to write a single question mark. Only affirmative statements. :-D
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Blog - My Photos - ScrewTurn Wiki