Page 3 of 4
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 2:24 pm
by Karl-Heinz
Hi Robert,
you are right !
the "SDK Tools Dir" setting ( see: XIDE "Tools" -> "Preferences" -> "Folders" Tabpage ) pointed to the 2.0 SDK Tools ... Now it points to the 4.6.1 dir and the created excel.dll shows CLR4.
very nice
BTW. The tlbimp.exe throws this warning:
TlbImp : warning TI3002 : Importing a type library into a platform agnostic assembly. This can cause errors if the type library is not truly platform agnostic.
not sure how to interpret this ?
regards
Karl-Heinz
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 2:49 pm
by Chris
Hi Karl-Heinz,
I assume it means that it is creating an AnyCPU assembly, but not sure. Maybe it means that if you try to use it under Mono or other platform it will possibly not work.
Chris
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 4:09 pm
by Karl-Heinz
Hi Chris,
when i fill the "Arguments:" sle with "/machine:x86" the TI3002 warning is gone, and ilspy shows correctly:
// Architecture: x86
instead of:
// Architecture: AnyCPU (64-bit preferred)
when i try "/machine:x64"
TlbImp : error TI2010 : A single valid machine type compatible with the input type library must be specified.
is thrown. Makes sense, as i do have a 32bit office only.
regards
Karl-Heinz
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 5:53 pm
by Chris
Very good point!
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 6:02 pm
by FFF
Motivated by this thread, i had a look on my machine - and i find TEN tlbimp.exe files 5 each in a 64 subnode, one each for "Windows", FX4.0, 4.5.1, 4.6, 4.6.1. Great godness... All of them below program(x86).
What a mess....
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 6:24 pm
by wriedmann
Hi Karl,
I have 14 of them, 2 for every version of the SDK (x86 and x64, I think).
Maybe everyone of them creates different code for different versions of the .NET Framework.
Wolfgang
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 9:28 pm
by FFF
Brrr.
@Chris, for now i entered in the "Tools" folder: C:Program Files (x86)Microsoft SDKsWindowsv10.0AbinNETFX 4.6.1 Toolsx64", do you think that's a "good" idea?
Karl
How to connect with Excel (via OLE)
Posted: Fri Sep 21, 2018 11:29 pm
by Chris
Yeah, I think it should be fine, actually probably all versions >=4.5 should be fine anyway I think. But in case there's any problem, it's easy to change it, this is why I made it a user's choice to select the SDK tools folder he want to use, than having the IDE decide this automatically...
How to connect with Excel (via OLE)
Posted: Sat Sep 22, 2018 7:02 am
by softdevo@tiscali.it
I use NPOI.dll, it is not necessary that Excel is installed on the machine, until today I have always done everything I need: create Excel files, add sheets, insert data and formulas, set properties of cells etcc.
Danilo
How to connect with Excel (via OLE)
Posted: Sat Sep 22, 2018 8:17 am
by Karl-Heinz
and
4.7
4.7.1
4.7.2
brings 3 x 2 more