转两列 或多列相同的数据到EXCEL
来源:互联网 发布:根据ip查域名 编辑:程序博客网 时间:2024/05/16 18:15
double jpgsize
string pictname,aa,ff,mcountry
long i=1,k,m,b,numrows,f,flg
numrows=dw_2.rowcount()
string pictname,aa,ff,mcountry
long i=1,k,m,b,numrows,f,flg
numrows=dw_2.rowcount()
xls=xlapp.application.activeworkbook
xlsub=xlapp.application.activeworkbook.worksheets[1]
numrows=dw_2.rowcount()
K=CEILING(numrows/18)
xls=xlapp.application.activeworkbook
xlsub=xlapp.application.activeworkbook.worksheets[1]
for i=1 to K - 1
b=99*i+1
aa='A'+string(B)
xlapp.Application.range("A1:E99").Select
xlapp.Application.Selection.Copy
xlapp.Application.range(AA).Select
xlapp.Application.Selection.Insert()
next
K=CEILING(numrows/18)
xls=xlapp.application.activeworkbook
xlsub=xlapp.application.activeworkbook.worksheets[1]
for i=1 to K - 1
b=99*i+1
aa='A'+string(B)
xlapp.Application.range("A1:E99").Select
xlapp.Application.Selection.Copy
xlapp.Application.range(AA).Select
xlapp.Application.Selection.Insert()
next
int rows,rowset,addrow,cloumnset,addcloumn
rowset=2
cloumnset=2
addrow=11
addcloumn=3
rowset=2
cloumnset=2
addrow=11
addcloumn=3
for i=1 to numrows
//left side
if mod(i,2)=1 then //转i=奇数的数据
cloumnset=2 //设置第一个固定的列
if mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1)<='9' then
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],2)
else
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],3)
end if
xlsub.Cells[rowset+4,cloumnset]=dw_2.object.q_qsheetitem_briefdesc[i]
xlsub.Cells[rowset+6,cloumnset]=round(dw_2.object.q_qsheetitem_price_fob[i],4)
xlsub.Cells[rowset+7,cloumnset]=round(dw_2.object.q_qsheetitem_price_elc[i],4)
xlsub.Cells[rowset+8,cloumnset]=dw_2.object.q_qsheetitem_typepackag[i]
end if
if mod(i,2)=0 then //转i=偶数的数据
cloumnset=cloumnset+addcloumn //设置第二个固定的列
if mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1)<='9' then
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],2)
else
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],3)
end if
xlsub.Cells[rowset+4,cloumnset]=dw_2.object.q_qsheetitem_briefdesc[i]
xlsub.Cells[rowset+6,cloumnset]=round(dw_2.object.q_qsheetitem_price_fob[i],4)
xlsub.Cells[rowset+7,cloumnset]=round(dw_2.object.q_qsheetitem_price_elc[i],4)
xlsub.Cells[rowset+8,cloumnset]=dw_2.object.q_qsheetitem_typepackag[i]
rowset=rowset+addrow
end if
next
//left side
if mod(i,2)=1 then //转i=奇数的数据
cloumnset=2 //设置第一个固定的列
if mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1)<='9' then
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],2)
else
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],3)
end if
xlsub.Cells[rowset+4,cloumnset]=dw_2.object.q_qsheetitem_briefdesc[i]
xlsub.Cells[rowset+6,cloumnset]=round(dw_2.object.q_qsheetitem_price_fob[i],4)
xlsub.Cells[rowset+7,cloumnset]=round(dw_2.object.q_qsheetitem_price_elc[i],4)
xlsub.Cells[rowset+8,cloumnset]=dw_2.object.q_qsheetitem_typepackag[i]
end if
if mod(i,2)=0 then //转i=偶数的数据
cloumnset=cloumnset+addcloumn //设置第二个固定的列
if mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_2.object.q_qsheetitem_itemnumber[i],3,1)<='9' then
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],2)
else
xlsub.Cells[rowset+1,cloumnset]=mid(dw_2.object.q_qsheetitem_itemnumber[i],3)
end if
xlsub.Cells[rowset+4,cloumnset]=dw_2.object.q_qsheetitem_briefdesc[i]
xlsub.Cells[rowset+6,cloumnset]=round(dw_2.object.q_qsheetitem_price_fob[i],4)
xlsub.Cells[rowset+7,cloumnset]=round(dw_2.object.q_qsheetitem_price_elc[i],4)
xlsub.Cells[rowset+8,cloumnset]=dw_2.object.q_qsheetitem_typepackag[i]
rowset=rowset+addrow
end if
next
//转多例数据到EXCEL(4例数据)
int xset,yset,x1,y1,x2,rows,xpage,pp
x1=18;y1=3;rows=1;xset=16;yset=2;x2=19;pp=12
xpage=0
long ll_left=67.6,ll_top=50.2,li_times=1
long px,py,pxset,pyset
px=270;py=315
x1=18;y1=3;rows=1;xset=16;yset=2;x2=19;pp=12
xpage=0
long ll_left=67.6,ll_top=50.2,li_times=1
long px,py,pxset,pyset
px=270;py=315
for i=1 to numrows
if mod(i,4)=1 then
yset=2
xset=16
pxset=10
pyset=10
xset=xset+x1*( rows - 1)
pxset=pxset+px*( rows - 1)
rows=rows+1
if mod(i,4)=1 then
yset=2
xset=16
pxset=10
pyset=10
xset=xset+x1*( rows - 1)
pxset=pxset+px*( rows - 1)
rows=rows+1
else
yset=yset+y1
pyset=pyset+py
end if
//write data (item and photo)
yset=yset+y1
pyset=pyset+py
end if
//write data (item and photo)
//write item
if mid(dw_3.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_3.object.itemnumber[i],3,1)<='9' then
xlsub.Cells[xset,yset]=mid(dw_3.object.itemnumber[i],2)
else
xlsub.Cells[xset,yset]=mid(dw_3.object.itemnumber[i],3)
end if
if mid(dw_3.object.q_qsheetitem_itemnumber[i],3,1) >='0' and mid(dw_3.object.itemnumber[i],3,1)<='9' then
xlsub.Cells[xset,yset]=mid(dw_3.object.itemnumber[i],2)
else
xlsub.Cells[xset,yset]=mid(dw_3.object.itemnumber[i],3)
end if
//write photo
pictname=dw_3.object.photoname[i]
if pictname<>'' and not(isnull(pictname)) then
if flg = 0 then flg = photoexist(pictname)
if FILEEXISTS(pictname) = true then
xlapp.Application.ActiveSheet.Pictures.Insert(string(pictname)).select
xlapp.Application.Selection.ShapeRange.height=120
xlapp.Application.Selection.ShapeRange.Left=pyset
xlapp.Application.Selection.ShapeRange.Top=pxset
end if
end if
next
pictname=dw_3.object.photoname[i]
if pictname<>'' and not(isnull(pictname)) then
if flg = 0 then flg = photoexist(pictname)
if FILEEXISTS(pictname) = true then
xlapp.Application.ActiveSheet.Pictures.Insert(string(pictname)).select
xlapp.Application.Selection.ShapeRange.height=120
xlapp.Application.Selection.ShapeRange.Left=pyset
xlapp.Application.Selection.ShapeRange.Top=pxset
end if
end if
next
- 转两列 或多列相同的数据到EXCEL
- excel比较两组或两列数据的相同项和不同项
- Excel插入多列相同数据
- excel合并相同列数据到同一单元格
- 页面合并多列相同的数据
- EXCEL 比较两列数据是否相同
- excel公式:获取两列数据中相同的数据,并展示在第三列。
- 使用SQL语句快速查找表中相同的记录或有相同数据的列
- excel批量修改 A列中相同项的同行B列数据
- Excel对比两列数据相同的在第三列打印出来
- Excel的行或列数据倒序排列
- excel数据对比-----查找两列(表)的相同数据
- Excel中如何找出两列数据中相同的数据,并且进行同行显示
- 如何将同一表的一列数据完全复制到另一列(两列数据类型相同)
- 2003版excel 删除某列数据相同的行只保留一行的方法
- Excel两列数据比较,相同的保存在另外一列
- excel比较两列数据中相同的且快速选中和填充
- 使用游标将excel不同表的列关联,并根据两表间相同的列值逐行更新数据
- 破解无线路由免费上网
- 出路
- awk1line英文注释版
- 无线路由器密码破解
- 转载 总结了一下十几年来的经验教训
- 转两列 或多列相同的数据到EXCEL
- 一步步教你如何用别人的无线上网,附带破解软件
- 一步步教你破解WIFI无线WEP网络密钥
- sed1line中文注释版
- zend 中的提交.......
- 复习概念
- 对联广告
- Silverlight入门学习(28)
- 生成随机验证码