Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lee Lee is offline
external usenet poster
 
Posts: 2
Default Reference using Excel with VB.NET

I am having a heck of a time trying to learn how to
manipulate Excel from Visual Basic.NET. Does anyone know
of any good reference articles or books that address this
subject specifically? I found one article on MSDN
called "Understanding the Excel Object Model from a .NET
Developer's Perspective" which is good but I need more
details such as how to open and existing spreadsheet,
copy data from one range of cells on one worksheet to a
range of cells on another worksheet, etc. I am using
WindowsXP Home and Visual Studio.NET 2003.
Any help will be truely appreciated!
Regards,
Lee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Reference using Excel with VB.NET

I believe, once you get your reference to the excel application, you just
use the Excel object model to do the rest

oxlApp.Workbook.Open "C:\my Documents\Myfile.xls"
oxlApp.Activesheet.Range("A1:B20").Copy Destination:= _
oxlApp.ActiveSheet.parent.Worksheets("Sheet3").Ran ge("C32")

There is a lot of sample code in the Knowledge Base

You can look at this page as a start as well:

http://msdn.microsoft.com/office/understanding/vsto/
Visual Studio Tools for the Microsoft Office System

It is all about .Net and Office.

--
Regards,
Tom Ogilvy


Lee wrote in message
...
I am having a heck of a time trying to learn how to
manipulate Excel from Visual Basic.NET. Does anyone know
of any good reference articles or books that address this
subject specifically? I found one article on MSDN
called "Understanding the Excel Object Model from a .NET
Developer's Perspective" which is good but I need more
details such as how to open and existing spreadsheet,
copy data from one range of cells on one worksheet to a
range of cells on another worksheet, etc. I am using
WindowsXP Home and Visual Studio.NET 2003.
Any help will be truely appreciated!
Regards,
Lee



  #3   Report Post  
Posted to microsoft.public.excel.programming
Lee Lee is offline
external usenet poster
 
Posts: 2
Default Reference using Excel with VB.NET

Thank you very much for the help and suggestions. They
were very helpful.
Regards,
Lee
-----Original Message-----
I believe, once you get your reference to the excel

application, you just
use the Excel object model to do the rest

oxlApp.Workbook.Open "C:\my Documents\Myfile.xls"
oxlApp.Activesheet.Range("A1:B20").Copy Destination:= _
oxlApp.ActiveSheet.parent.Worksheets("Sheet3").Ran ge

("C32")

There is a lot of sample code in the Knowledge Base

You can look at this page as a start as well:

http://msdn.microsoft.com/office/understanding/vsto/
Visual Studio Tools for the Microsoft Office System

It is all about .Net and Office.

--
Regards,
Tom Ogilvy


Lee wrote in message
...
I am having a heck of a time trying to learn how to
manipulate Excel from Visual Basic.NET. Does anyone

know
of any good reference articles or books that address

this
subject specifically? I found one article on MSDN
called "Understanding the Excel Object Model from

a .NET
Developer's Perspective" which is good but I need more
details such as how to open and existing spreadsheet,
copy data from one range of cells on one worksheet to a
range of cells on another worksheet, etc. I am using
WindowsXP Home and Visual Studio.NET 2003.
Any help will be truely appreciated!
Regards,
Lee



.

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
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
Row reference increment but preserve column reference Pwanda Excel Worksheet Functions 1 April 28th 05 01:12 PM
Macro to Reference Column Next to Current Reference dolphinv4 Excel Discussion (Misc queries) 2 April 11th 05 08:36 AM


All times are GMT +1. The time now is 10:26 AM.

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"