943,900 Members | Top Members by Rank

Ad:
Jun 16th, 2007
0

How to access and modify values of a OLE object(Excel Worksheet)

Expand Post »
Hello,

I want to know is it possible to access and modify content of a Excel worksheet dynamically inserted as OLE object in a form. I wish to check and update values of various cells by cell number of the worksheet, but not being sure if possible.

thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deep_3657 is offline Offline
13 posts
since Jul 2006
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Why don't you try it?

There is nothing impossible when you get the connection and permission.
Reputation Points: 10
Solved Threads: 9
Junior Poster
AV Manoharan is offline Offline
166 posts
since Jun 2007
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Why don't you try it?

There is nothing impossible when you get the connection and permission.
Yes I want to use it, but have no idea about how to go about it
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deep_3657 is offline Offline
13 posts
since Jul 2006
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Hi Deep,

U r opening Excel using "Excel Object " or by Opening in "OLE Control"...?

I have the code if u r opening with
Excel Object.

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Click to Expand / Collapse  Quote originally posted by QVeen72 ...
Hi Deep,

U r opening Excel using "Excel Object " or by Opening in "OLE Control"...?

I have the code if u r opening with
Excel Object.

Regards
Veena

I have embedded excel as a OLE object
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deep_3657 is offline Offline
13 posts
since Jul 2006
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Click to Expand / Collapse  Quote originally posted by deep_3657 ...
I have embedded excel as a OLE object
See, I requested you to try.

See when you have the connection as an OLE object its behaviour is just like a table of the database. Each sheet corresponding to one table and within each sheet the columns represent table fields.

the record set object works fine here also.

Try and let me know your progress.
Reputation Points: 10
Solved Threads: 9
Junior Poster
AV Manoharan is offline Offline
166 posts
since Jun 2007
Jun 18th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

But the excel documents I am working with are not the set of records like we have in database.

I am working with excel files which are soft copies of various physical documents like invoice, quotations etc. Programitically I would say various informations are scattered all around.

However Cell Number where a specific information is found is always fixed. This is the reason i wish to access is by cell numbers rather than by database approach.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
deep_3657 is offline Offline
13 posts
since Jul 2006
Jun 19th, 2007
0

Re: How to access and modify values of a OLE object(Excel Worksheet)

Click to Expand / Collapse  Quote originally posted by deep_3657 ...
But the excel documents I am working with are not the set of records like we have in database.

I am working with excel files which are soft copies of various physical documents like invoice, quotations etc. Programitically I would say various informations are scattered all around.

However Cell Number where a specific information is found is always fixed. This is the reason i wish to access is by cell numbers rather than by database approach.
Then I suggest, the recordset is to be populated by two indexes to draw row as well as coulums.

That is, suppose your recordset is in the second record, then the raw corresponds to the cursor location second among the records.

Then you have to access columns right with the recordsetname.Fields(index)-which is your columns in excel in that row

recordsetname.MoveNext increases the row count to one
and again your column index has to reinitialise else it will be out of your excel columns.

Now, you got it I hope.
Get back to the thread

regards
AV Manoharan
Reputation Points: 10
Solved Threads: 9
Junior Poster
AV Manoharan is offline Offline
166 posts
since Jun 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: anyone interested in developing open source software
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: help me its urgent!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC