Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2003 automated instead of Excel 2007

Hi,

I have Excel 2003 and 2007 installed on the same machine.

I'm trying to automate Excel 2007, but everything I seem to do ends up in
Excel 2003.

I have a file (XLSX) which was made in Excel 2007 and I'm trying to open it
programmatically. But since the file has more than 65K rows, I keep getting
a trunction warning and after the file opens I have only the first 65K rows.

I use late binding. I tried acquiring the Application object using
Excel.Application and Excel.Application.12 prog IDs. I also tried early
binding (adding the Office 12 library and the Excel library) but they all
result in the same problem.

Any idea would be greatly appreciated.

Thanks!!!

Bert.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Excel 2003 automated instead of Excel 2007

Without going in to code specifics...

This link explains how to open a file with VBScript. In many cases you can
apply VBScript right inside your procedure or module.

This link should give you some pointers on how to go about opening a
specified file with what ever version Excel you choose (you will need to
specify the path for your version of Excel 2007).

http://www.visualbasicscript.com/m_5...ey_/tm.htm#549

Mark

"Bert" wrote in message
...
Hi,

I have Excel 2003 and 2007 installed on the same machine.

I'm trying to automate Excel 2007, but everything I seem to do ends up in
Excel 2003.

I have a file (XLSX) which was made in Excel 2007 and I'm trying to open
it programmatically. But since the file has more than 65K rows, I keep
getting a trunction warning and after the file opens I have only the first
65K rows.

I use late binding. I tried acquiring the Application object using
Excel.Application and Excel.Application.12 prog IDs. I also tried early
binding (adding the Office 12 library and the Excel library) but they all
result in the same problem.

Any idea would be greatly appreciated.

Thanks!!!

Bert.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2003 automated instead of Excel 2007

Mark,

Thanks for your reply.

Executing Excel through Shell will not do. I need the COM object model
behind the workbook in my application, not as an Excel macro.

Unfortunately, the problem remains.

Thanks

"Mark Ivey" wrote in message
...
Without going in to code specifics...

This link explains how to open a file with VBScript. In many cases you can
apply VBScript right inside your procedure or module.

This link should give you some pointers on how to go about opening a
specified file with what ever version Excel you choose (you will need to
specify the path for your version of Excel 2007).

http://www.visualbasicscript.com/m_5...ey_/tm.htm#549

Mark

"Bert" wrote in message
...
Hi,

I have Excel 2003 and 2007 installed on the same machine.

I'm trying to automate Excel 2007, but everything I seem to do ends up in
Excel 2003.

I have a file (XLSX) which was made in Excel 2007 and I'm trying to open
it programmatically. But since the file has more than 65K rows, I keep
getting a trunction warning and after the file opens I have only the
first 65K rows.

I use late binding. I tried acquiring the Application object using
Excel.Application and Excel.Application.12 prog IDs. I also tried early
binding (adding the Office 12 library and the Excel library) but they all
result in the same problem.

Any idea would be greatly appreciated.

Thanks!!!

Bert.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default Excel 2003 automated instead of Excel 2007

I find Excel 2003 and 2007 like to each take control of "Excel.Application".
He who registers last registers best.

That control takes the form of this registry entry:

HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}\LocalServer32

When you open Regedit.exe to this key you see two entries in the right
panel. The "LocalServer32" entry seems to be the controling entry but its
value is in some jibberish that I don't know how to edit. But if
"LocalServer32" is not present I find that "(Default)" is used, and that is
editable.

So if you want to switch the Excel version that automates:

Rename "LocalServer32" to say "LocalServer32x". Then edit Default to point
to the Excel.exe you want to run.

--
Jim
"Bert" wrote in message
...
Mark,

Thanks for your reply.

Executing Excel through Shell will not do. I need the COM object model
behind the workbook in my application, not as an Excel macro.

Unfortunately, the problem remains.

Thanks

"Mark Ivey" wrote in message
...
Without going in to code specifics...

This link explains how to open a file with VBScript. In many cases you
can apply VBScript right inside your procedure or module.

This link should give you some pointers on how to go about opening a
specified file with what ever version Excel you choose (you will need to
specify the path for your version of Excel 2007).

http://www.visualbasicscript.com/m_5...ey_/tm.htm#549

Mark

"Bert" wrote in message
...
Hi,

I have Excel 2003 and 2007 installed on the same machine.

I'm trying to automate Excel 2007, but everything I seem to do ends up
in Excel 2003.

I have a file (XLSX) which was made in Excel 2007 and I'm trying to open
it programmatically. But since the file has more than 65K rows, I keep
getting a trunction warning and after the file opens I have only the
first 65K rows.

I use late binding. I tried acquiring the Application object using
Excel.Application and Excel.Application.12 prog IDs. I also tried early
binding (adding the Office 12 library and the Excel library) but they
all result in the same problem.

Any idea would be greatly appreciated.

Thanks!!!

Bert.





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
Excel 2007 versus Excel 2003 & Excel 97-2003 fully compatible Bumpersnesty Excel Worksheet Functions 0 April 26th 10 09:44 PM
Excel 2003 help doesn't work. I got both Excel 2003 and 2007 insta Kenneth Andersen Excel Discussion (Misc queries) 0 February 16th 10 10:44 AM
Excel 2007 Macro Help (Excel 2003 not working in 2007) Pman Excel Discussion (Misc queries) 4 May 29th 08 06:29 PM
Excel 2007/2003 - Automated value entry Raj Excel Discussion (Misc queries) 3 May 5th 08 07:47 PM
Automated Formulas in Excel 2003 Amy Kelley Excel Discussion (Misc queries) 1 December 28th 05 07:19 PM


All times are GMT +1. The time now is 06:32 AM.

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

About Us

"It's about Microsoft Excel"