473,418 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

coding Excel from dotnet

Rod
I want to manipulate a spreadsheet from within dotnet (using VB). I cant
figure out how to get started.

i.e. what is the equivalent to the VBA code

On Error Resume Next
Set objExcel = GetObject(, "Excel.Application")
If objExcel Is Nothing Then
Set objExcel = New Excel.Application
End If

many thanks for any tips

Rod
Nov 23 '05 #1
2 5657
"Rod" <Ro**********@Hotmail.com> schrieb:
I want to manipulate a spreadsheet from within dotnet (using VB). I cant
figure out how to get started.


General:

INFO: Develop Microsoft Office Solutions with Visual Studio .NET
<URL:http://support.microsoft.com/?kbid=311452>

HOWTO: Automate Microsoft Excel from Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;301982>

How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With
Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;316934>

Samples:

How to handle events for Excel 2003 by using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;822750>

HOW TO: Handle Events for Excel by Using Visual Basic .NET
<URL:http://support.microsoft.com/default.aspx?scid=kb;en-us;302814>

HOWTO: Automate Microsoft Excel from Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;301982>

HOW TO: Transfer Data to an Excel Workbook by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;306022>

HOW TO: Handle Events for Excel by Using Visual C# .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;823981>

Related:

BUG: "Old Format or Invalid Type Library" Error When Automating Excel 2002
<URL:http://support.microsoft.com/?scid=kb;EN-US;320369>

PRB: Office Application Does Not Quit After Automation from Visual Studio
..NET Client
<URL:http://support.microsoft.com/?scid=kb;EN-US;317109>

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic
..NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;304643>

INFO: Considerations for Server-Side Automation of Office
<URL:http://support.microsoft.com/?scid=kb;EN-US;257757>

More information:

<URL:http://support.microsoft.com/search/?query=Excel+.NET&catalog=LCID%3D1033>

There are loads of information about how to use Office applications together
with .NET in the Microsoft Office Developer Center:

Microsoft Office Developer Center
<URL:http://msdn.microsoft.com/office/>

Office Development
<URL:http://msdn.microsoft.com/office/understanding/>

Using the Microsoft Visual Studio Tools for the Microsoft Office System
<URL:http://www.devx.com/codemag/Article/18233/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #2
Rod
Thanks for your comprehensive reply.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uw**************@tk2msftngp13.phx.gbl...
"Rod" <Ro**********@Hotmail.com> schrieb:
I want to manipulate a spreadsheet from within dotnet (using VB). I cant
figure out how to get started.
General:

INFO: Develop Microsoft Office Solutions with Visual Studio .NET
<URL:http://support.microsoft.com/?kbid=311452>

HOWTO: Automate Microsoft Excel from Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;301982>

How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook

With Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;316934>

Samples:

How to handle events for Excel 2003 by using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;822750>

HOW TO: Handle Events for Excel by Using Visual Basic .NET
<URL:http://support.microsoft.com/default.aspx?scid=kb;en-us;302814>

HOWTO: Automate Microsoft Excel from Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;301982>

HOW TO: Transfer Data to an Excel Workbook by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;306022>

HOW TO: Handle Events for Excel by Using Visual C# .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;823981>

Related:

BUG: "Old Format or Invalid Type Library" Error When Automating Excel 2002
<URL:http://support.microsoft.com/?scid=kb;EN-US;320369>

PRB: Office Application Does Not Quit After Automation from Visual Studio
.NET Client
<URL:http://support.microsoft.com/?scid=kb;EN-US;317109>

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;304643>

INFO: Considerations for Server-Side Automation of Office
<URL:http://support.microsoft.com/?scid=kb;EN-US;257757>

More information:

<URL:http://support.microsoft.com/search/...alog=LCID%3D10
33>
There are loads of information about how to use Office applications together with .NET in the Microsoft Office Developer Center:

Microsoft Office Developer Center
<URL:http://msdn.microsoft.com/office/>

Office Development
<URL:http://msdn.microsoft.com/office/understanding/>

Using the Microsoft Visual Studio Tools for the Microsoft Office System
<URL:http://www.devx.com/codemag/Article/18233/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Faith | last post by:
Hello. I need to take a column from Excel(unknown amount of rows) that will be selected by the user and copy those cells. Then I will need to paste those cells into the first column in a Data...
1
by: Brian Conklin | last post by:
Hello Eneryone, I am having a problem. I have written a little app that will take a text "pipe" delimited file and place all of the values in to an Excel spreadsheet. It works great on any of my...
5
by: Graham | last post by:
I have been asked by a client to produce a proof of concept of how .Net performs and works within an Excel workbook. Everything works perfectly with all the required events firing and data being read...
3
by: Carlos Magalhaes | last post by:
Hey All, I am doing some excel automation using the excel COM. I can do most of the functions and its working well until I come across a formula. I can run a formula and insert the formula...
2
by: LBT | last post by:
Good day VB.Net seniors and experts, I have a window service application which will import data from Excel file. I face a problem where Excel.exe process cannot be released from memory once...
5
by: DavidB | last post by:
how do I get Excel version in VB.NET??
3
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim appExcel As Object Dim wkb1 As Excel.Workbook Dim wks1...
1
by: srinivas | last post by:
Hi , I am a dotnet developer.I am working on crystal reports.My requirement is like this I have an excel sheet with some values.I need to read the excel values from excel sheet and need...
13
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.