Edit Excel file

J

Jayakarthik

Hi All,

I want to edit an excel file by using COM Objects (OWC /
Excel.Application ..) Which one can be used ? Can you show
an example code ?

I would appreciate any help.

Thanz.
 
B

Bob Phillips

Are you intending to cut the code yourself, or looking for a COM product
that will do it for you? If the latter, I think they tend to be a bit more
specific, doing a particular function, but that is only a guess. If the
former, there are loads of articles at MS on how to do it with VB/VBA. This
list, compiled by Tom Ogilvy, should give you a start

http://support.microsoft.com/support/kb/articles/Q219/1/51.ASP
HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic

http://support.microsoft.com/support/kb/articles/Q253/2/35.ASP
Q253235 - FILE: OFFAUTMN.EXE Discusses Office 97 and 2000 Automation and
Provides Sample Code

http://support.microsoft.com/support/officedev/offdevout.asp
Programming Office from Outside Office

http://support.microsoft.com/support/OfficeDev/offdevin.asp
Programming Office from Within Office

http://support.microsoft.com/support/excel/content/Automation/automation.asp
Using Automation with Microsoft Excel 97

http://support.microsoft.com/support/OfficeDev/offdevinapps.asp
Programming Office from Within Office

The hardest part is understanding the Excel Object model. If you are already
familiar, great, otherwise I would recommend the book that I use, John
Green's Excel 2000 Programmer's Reference Manual published by Wrox (there is
a 2002 version now)
 
J

Jayakarthik

Dear Bob,

Thanx for help.

My intention is to embed an Chart in the worksheet by
using server side Excel components. I searched for a long
time and found no way to do. So, Myself planned to create
a template Excel file which included Chart object.

By editing it, we can provide dynamic data to the user.

Here my problem is, how to open and edit data in the
existing file ? which component (Server side) can be used
for that?

Thanz again.
 
B

Bob Phillips

You should be able to do that from any Automation compliant application,
such as VB or C++ (plus many more). Automation simply enables one
application to work with another application's objects.

If you want to create chart templates, I suggest that you visit John
Walkenbach's site, as he has been there before.
http://j-walk.com/ss/excel/tips/tip83.htm is not specifically about charting
within automation, but if you read some of those articles I mentioned
earlier, and this one
HOWTO: Create Excel Chart w/OLE Automation from Visual Basic
(142387) - This article illustrates how you can use Automation in a Visual
Basic program to create an Excel workbook that contains a chart embedded on
a worksheet.
you should get some good pointers.
 
T

Tom Ogilvy

Just to add a few possibilities to Bob's advice -

MS doesn't recommend using office applications in a server side setting. So
assume you have your excel file on the server and you want to update the
data in the file. Assume further that the data is set up like a database
table. You can update the data using ADO without having excel present. You
could also have the Excel file linked to an access mdb file and update the
database in the mdb file using ADO.

Regards,
Tom Ogilvy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top