Maybe he just missed something, but when I write code to interact with Excel, here's how.
- I am adding a link to Excel Com libraries.
- VS creates PIA - Microsoft.Office.Interop.Excel .... (via tlbimp right?).
- I copy exe dll and interop (PIA) to any machine (with .net) and it works?
Is there a scenario when I have to deploy / register a PIA? Or is there something wrong with me because it seems to me that embedding the PIA in the main assembly does not seem like a big feature?
Please excuse my ignorance, if any.
Update:
So I did some tests, I wrote an application that opens excel adds “hello” to the cell and saves the file.
I built it on my Win7 Dev machine with Office 2003 installed (so I referenced 2003 libs). Interestingly, without the built-in PIA, the 9KB application (only 3 PIAs up to 1.32 MB). With integrated PIA exe 13KB .
Secondly, with the built-in PIA, the application worked on a computer with Office 2007 and 2010. And without the built-in PIA, on WinXP + Office2007 this happened only when the PIA were not in the exe directory.
So, I guess some method, is there some kind of dynamic resolution? And then why did it work on Win7 without PIA in the exe directory, but on WinXP it failed (only when the PIA was not in exe dir), did the Win7 PIA box deployed all over the world or something like that?
thanks
Gideon
source share