anybody would help me about loop to excel?
i have a database name database and the name of table is tblsample..
now, i used loop to retrieve the data from database and the output of loop
will come out to msexcel....but i cant get the output i want.instead, the last
record from the database table will always comeout in cell A1.. please help me, if you want to see the code im willing to provide
Re: anybody would help me about loop to excel?
The easiest way to put data from a database into Excel is to use the CopyFromRecordset method.
For an example & explanation, see the Excel Tutorial link in my signature.
Re: anybody would help me about loop to excel?
Quote:
Originally Posted by reden
.... the last record from the database table will always comeout in cell A1..
This was probably caused by you not incrementing to the NEXT cell for each record retrieved. The end result, is the last record being displayed - if you could slow the clock,
you would probably see each returned record appear in that one cell (A1).
You would need to post your code block to be certain ;)
Si_the_geek posted an alternate to looping.