Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems targeting any version of Excel


I'm using VS.NET 2003 and attempting to create an app that can talk to
any version of Excel from 5.0 onwards. On my dev machine I have Office
2002 (Office XP) installed. This obviously provides an EXCEL.EXE that
exposes the Excel 10.0 Object Library. I also have in my Office install
area this file:

XL5EN32.OLB

which is registered as "Microsoft Excel 5.0 Object Library". But when I
add an interop reference to this, and examine it in Object Browser, I
see that it seems to be extremely 'naively' implemented - all the
methods and properties and so forth are present, but the only TYPE used
is OBJECT. Whereas the 10.0 type library is strongly-typed throughout.

I have confirmed this using the old OLE VIEW application. For example:

XL5EN32.OLB Workbooks.Open:

VARIANT Open(
VARIANT Filename,
VARIANT UpdateLinks,
VARIANT ReadOnly,
VARIANT Format,
VARIANT Password,
VARIANT WriteResPassword,
VARIANT IgnoreReadOnlyRecommended,
VARIANT Origin,
VARIANT Delimiter,
VARIANT Editable,
VARIANT Notify,
VARIANT Converter);

EXCEL.EXE (version 10.0) Workbooks.Open:

HRESULT Open(
[in] BSTR Filename,
[in, optional] VARIANT UpdateLinks,
[in, optional] VARIANT ReadOnly,
[in, optional] VARIANT Format,
[in, optional] VARIANT Password,
[in, optional] VARIANT WriteResPassword,
[in, optional] VARIANT IgnoreReadOnlyRecommended,
[in, optional] VARIANT Origin,
[in, optional] VARIANT Delimiter,
[in, optional] VARIANT Editable,
[in, optional] VARIANT Notify,
[in, optional] VARIANT Converter,
[in, optional] VARIANT AddToMru,
[in, optional] VARIANT Local,
[in, optional] VARIANT CorruptLoad,
[in, lcid] long lcid,
[out, retval] Workbook** RHS);

Now, although using XL5EN32.OLB I *can* write an app that will work
with Excel versions from 5.0 up, while actually *writing* it I get no
intellisense, no strong typing, in fact I am effectively using late
binding and As Object variables all the way through, which is going to
be a PAIN.

So... what I am after is an Excel 5.0 type library with strong typing.
OR in fact since 5.0 is not an absolute requirement, simply the
*earliest* Excel type library with strong typing. I can get hold of old
Offices; which one should I go for?

TIA,

--
Larry Lard
Replies to group please

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I save an Excel 97-2003 version or 2007 version for Mac 200 Bronigal Excel Discussion (Misc queries) 1 December 7th 09 08:04 AM
Recover earlier version of excel sheet after new version saved? stephanie38 Excel Discussion (Misc queries) 3 June 17th 05 03:52 AM
Targeting different worksheets dependant on the date WorkerB5 Excel Programming 5 May 17th 04 12:24 AM
Problems with german excel version Tom Ogilvy Excel Programming 0 August 26th 03 12:38 PM
Problems with german excel version Stephan Kassanke Excel Programming 0 August 26th 03 09:11 AM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"