如何控制图片的位置及大小.分有多少给多少!!!!!
我不知我有多少分.但是有谁能帮我解决我所提的问题我把我的分全给他.这个论谈里面我搞不太明白,给他账号,他自己去加分.现在图片加入到EXCEL是解决了,代码在网上找的,但是图片的大小和位置无法控制,我想让图片固定在某个单元格.现在代码如下:
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from images where 1=1"
rs.open sql,conn,1,1
Set ExcelApp =CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Add
ExcelBook.WorkSheets(1).cells(1,1).value ="用户表"
ExcelBook.WorkSheets(1).cells(2,1).value = "用户编号"
ExcelBook.WorkSheets(1).cells(2,2).value = "登陆名"
ExcelBook.WorkSheets(1).cells(2,3).value = "真实姓名"
ExcelBook.WorkSheets(1).cells(2,4).value = "密码"
cnt =3
do while not rs.eof
ExcelBook.WorkSheets(1).cells(cnt,1).value = rs("id")
ExcelBook.WorkSheets(1).cells(cnt,2).value = rs("huohao")
ExcelBook.WorkSheets(1).Pictures.Insert("C:\3.jpg").Select '注明:我想让图片在每行的第三列.并且不能挡做别的单元格的内容.最好能固定大小.
ExcelBook.WorkSheets(1).cells(cnt,4).value ="aaaa"
rs.movenext
cnt = cint(cnt) + 1
loop
Excelbook.SaveAs "d:\yourfile.xls" '这个是数据导出完毕以后在D盘存成文件
ExcelApp.Application.Quit '导出以后退出Excel
Set ExcelApp = Nothing '注销Excel对象
%>
我是生手,回复时请详细说明代码及用途.