因为工作的原因,需要用到VBA,碰到读图片和写图片: Sub Macro01() '从工作表中保存图片 Application.ScreenUpdating = False Dim pth, shp, n pth = ThisWorkbook.Path & "\导出图片\" For Each shp In ActiveSheet.Shapes Then n = n + shp.Copy , , shp.Width, shp.Height).Chart .Parent.Selec…
1.查询表中所有数据 select * from 表名; 例:select * from stu; 2.查询的同时修改表中数据 select * from 表名 for update; 例:select * from stu for update; 3.往表中添加数据 insert into 表名(列1,列2...) values(值1,值2...); 例:insert into stu(id,name,age) values(1,'zhangsan',23); 注意:字符串类型要用单引号括起…
sub 汇总多个工作簿() Application.ScreenUpdating = False Dim wb As Workbook, f As String, l As String, n As String, m As String, j As Integer f = ThisWorkbook.Path & "\" l = f & "*.xls" m = Dir(l) Do While m <> "" If m…
动态数组使用: https://zhidao.baidu.com/question/1432222709706721499.html 使用Redim动态数组即可. 1 2 3 4 5 6 7 8 Sub test1() Dim a() As Integer, iRow As Long, i As Integer iRow = Cells(Rows.Count, 1).End(xlUp).Row ReDim a(iRow - 1) For i = 1 To UBou…
在日常工作中,大家有时会遇到过这样的情况:使用Excel编制的报表.表格.程序等,在单元格中设置了公式.函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码就会破解. 一,录制一个空白宏 二,编辑宏,替换以下代码 Public Sub 工作表保护密码破解() Const DB…
. I have added two obejcts data source to Report Viewer. 2. in RDLC i have created two tables and in table Properties set PageBreakAtEnd ="True" 这样每个Table生成到单独的工作表中. http://forums.asp.net/t/1816764.aspx?RDLC+Mutiple+Sheets+in+Excel 来自为知笔记(Wiz)…