Question Locked

Read a Excel File using Vb6.0

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

TO read a excel file is quite simple using vb. But there is a problem. My excel file is online updatable file.

the excel file become read only when i read the file using vb. So the excel can't update..this is the problem

so plz any body can assist me

thank u

5 replies

by athome

I dont know how you are opening the file, but you could simply pull a copy down locally and then read it ?

I've also had a single file being used by multiple connections - this I did using as the the datablock in a set size - eg: open "zz" for READ WRITE as RANDOM LEN=xxx

then when you GET a block its a set size - but the file isnt locked.

You need to look at the method your using and perhaps try something else.

The Random option were the file is a set size is a good old fashion method - but works well.

Hope this helps.

dave

by thameem_baan

Hi

Eventhough if the file is online it might be residing at some webserver location .In that case place the component under MTS then you should be able to access the file and update it. As you said if you directly access it will give readonly error.

by irinar

Read the article 'VB6 FileSystemObject makes it easier to work with files' and other related topics.
It helped me!

by crajeshbe

Thank u for ur response.

i just copy and paste last saved position of excel into a temp excel file using fso. With that temp file i update the sql. it doesn't affect the main file ..

Thank very much
Rajesh

This discussion is closed to new replies.