|
-
Dec 3rd, 2002, 02:09 AM
#1
Thread Starter
New Member
Report in Microsoft Excel Sheet by using VB 6
Hi,
I what some sample programs which use Microsoft Excel to write a report from oracle tables
Thanks
-
Dec 3rd, 2002, 03:27 AM
#2
Well ...
I doubt if you will get a ready code here 
Try searching the codebank of www.vbworld.com, or sites such as www.planetsourcecode.com, www.vbcode.com etc for examples of automating Excel. You can ask specific questions about writing an application that will interact with MS Excel.
.
-
Dec 3rd, 2002, 05:21 AM
#3
Hyperactive Member
hi,
u want to read from oracle tables and insert into excel??? if so here is an alternative.
dim xlapp as new excel.application
dim xlwkb as new excel.workbook
dim xlwks as new excel.worksheet
dim db1 as new adodb.connection
dim rs as new adodb.recordset
set xlwkb=xlapp.workbooks.open("c:\temp.xls")
xlwkb.activesheet
db1.open "dsn=test;uid=scott;pwd=tiger;"
rs.open "select * from emp",db1
rs.cursorlocation=aduseclient
i=1
while not rs.eof
xlwkb.range("A" & i)=rs.fields("empl_Name")
rs.movenext
wend
xlwkb.save
xlwkb.close
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|