oleapp.ActiveSheet.PictureS.Insert(\ͼƬÎļþÃû\oleapp.Selection.ShapeRange.LockAspectRatio =.T. oleapp.Selection.ShapeRange.Height = 57
*!* 68£®ÀàÐÍΪ×Ö·ûÐ͵Ä×Ö¶ÎÊä³öµ½excel ÖУ¬Ç°ÃæµÄÁã±»×Ô¶¯È¥µô£¬ÀýÈç¡°009877¡±±äΪ¡°9877¡±£¬Ôõô½â¾ö£¿
1.ÔÚ×Ö·û´®Ç°Ãæ¼Ó°ë½Çµ¥ÒýºÅ¡° ' ¡±£¬ ÀýÈ磺
o.Cells(1,1).Value=\»òÓñäÁ¿
cString=\ÆäÖÐ0123¿ÉÒÔÈ¡×Ô±íÖÐÒ»¸ö×ֶΠo.Cells(1,1).Value=cString &&o.Range(\2.
oExcel.CELLS(1,1).Select &&»òeole.Range(\
oExcel.Selection.NumberFormatLocal = \°Ñ±»Ñ¡¶¨µÄµ¥Ôª¸ñÉèΪÎı¾¸ñʽ oExcel.Cells(1,1).Value=\¸øËùÑ¡µ¥Ôª¸ñ¸²Öµ *!* 69£®ÔÚ Excel ÖвåÈëÐкÍÁÐ :
objExcel.Rows(1).Insert() &&ÔÚµÚÒ»ÐÐÇ°Ãæ²åÈëÒ»ÐÐ objExcel.Columns(2).Insert() &&ÔÚµÚ¶þÁÐÇ°Ãæ²åÈëÒ»ÁÐ *!* 70£®»ñÈ¡ Excel ¼Ç¼Êý
loXls = Createobject(\
bookExcel = loXls.Application.Workbooks.Open(\nrows=bookExcel.Worksheets('pz') UsedRange =nrows.UsedRange
r=UsedRange.Rows.Count &&ÓÐÊý¾ÝµÄ×ÜÐÐÊý c=UsedRange.Columns.Count &&ÓÐÊý¾ÝµÄ×ÜÁÐÊý loXls.Workbooks.Close loXls.Quit
*!* 71£®ÔÚEXCELÖÐÈçºÎÔÚ´ò¿ªÎļþµÄͬʱ×Ô¶¯Ö´ÐÐÒ»¸öºêÃüÁî¡£ Ö»Òª½«ºêµÄÃüÃûΪ AUTO_OPEN ¼´¿É¡£
Èç¹ûÒªÔÚÎļþ¹Ø±ÕʱÔËÐУ¬ÔòÃüÃûΪauto_close ¡£ *!* 72£®ÔÚVFPÖпÉÒÔÖ´ÐÐEXCELµÄÑ¡ÔñÐÔÕ³ÌùÂð? .Range(\»á³ö´í .Range(\Ò²»á³ö´í .Range(\Ö»ºÃÕâÑùÁË *!* 73£®ÈçºÎ²ÅÄÜÖ»Õ³ÌùÖµÄØ? xlPasteValues=-4163
oExcel.Range(\oExcel.Selection.Copy
oExcel.Range(\
*×¢Òâ:ÔÚExcel ÖУ¬\ÊÇÒ»¸ö³£Á¿£¬ËüµÄÖµÊÇÒ»¸öÊýÖµÐ͵ģº-4163 oExcel.Range(\
oExcel.Range(\Õ³ÌùÐС¢Áпí oExcel.Range(\Õ³Ìù¸ñʽ *!* 74£®ÈçºÎ´Óexcel¶ÁÈ¡Êý¾Ý
*******½¨Á¢Ò»¸öexcel¶ÔÏó******* Local hb1 As excel.Application
csheetname=Trim(Thisform.text2.Value)&&¶ÁÈ¡Óû§Òª¶ÁÈ¡excelµÄsheetÃû ***¶ÁÈ¡Êý¾ÝÔ´ËùÔÚµÄEXCELÎļþÃû**** If Empty(Trim(Thisformset.filepath))
Messagebox(\ÇëÏÈÑ¡ÔñÒªµ¼ÈëµÄexcelÎļþ£¡\Ìáʾ\ Return Endif
If Empty(Trim(csheetname))
Messagebox(\ÇëÏÈÑ¡ÔñÒªµ¼ÈëµÄ¹¤×÷±ísheetÃû³Æ£¡\Ìáʾ\ Return Endif Try
hb1=Createobject(\Catch
Messagebox(\Çë¼ì²éÄãÊÇ·ñÒÑ°²×°microsoft excelÓ¦ÓóÌÐò£¡\Ìáʾ\Endtry
***´ò¿ªEXCEL¶ÔÏ󣬿ªÊ¼¶ÁÈ¡Êý¾Ý******** HB1.workbooks.Open(Trim(Thisformset.filepath)) hb1.Sheets(csheetname).Select
Sele Store&&ÕâÊÇÒª¶ÁÈ¡µÄÊý¾Ý´æ·ÅµÄ±í Zap
isend=.F. &&ÓÃÓÚÅжÏÊÇ·ñ¼Ç¼Òѵ½µ× i=1
Do While isend=.F. Append Blank crq=Dtoc(drq)
cdh=hb1.Cells(i,1).Value If Isnull(cdh) cdh=\ Endif
**ÓÃÓÚÅжÏÊý¾ÝÀàÐÍ£¬Êý¾ÝÀàÐÍÒ»¶¨ÒªÅжÏÊÇ·ñΪNULL£¬** ** È»ºóÈç¹û²»ÊÇÖ¸¶¨µÄÀàÐÍ£¬»¹Òª½øÐÐת»»************* If Type(\
cdh=Alltrim(Str(cdh)) Endif
cdwmc=Trim(hb1.Cells(i,2).Value) If Isnull(cdwmc) cdwmc=\ Endif
cgg=hb1.Cells(i,3).Value If Isnull(cgg) cgg=\ Else
If Type(\
cgg=Alltrim(Str(cgg)) Endif Endif
cjldw=hb1.Cells(i,4).Value If Isnull(cjldw) cjldw=\ Endif
cjldw=Iif(Type(\ nsl=hb1.Cells(i,5).Value If Isnull(nsl) nsl=0 Endif
cch=Trim(hb1.Cells(i,6).Value) If Isnull(cch) cch='' Endif
cxh=hb1.Cells(i,8).Value If Isnull(cxh) cxh=\ Else
If Type(\ cxh=Trim(Str(cxh)) Else
cxh=Trim(cxh) Endif Endif
ccpmc=hb1.Cells(i,9).Value If Isnull(ccpmc) ccpmc='' Endif
If Type(\
ccpmc=Alltrim(Str(ccpmc)) Else
ccpmc=Trim(ccpmc) Endif
Select Store
Replace rq With crq,dh With cdh,dwmc With cdwmc,gg With cgg,jldw With cjldw,sl With nsl,ch With cch,cpbh With cxh,cpmc With ccpmc
i=i+1
&&Èç¹ûÒ»ÐÐȫΪ¿Õ£¬¼Ç×÷¼Ç¼µ½µ×£¬Èç¹ûÖмä´æÔÚ¶àÐеÄÎÊÌ⣬ÎÒûÓÐ×ö¿¼ÂÇ**** If Empty(cxh) And nsl=0 And Empty(cch) And Empty(cjldw) And Empty(cdh) And Empty(cgg)
isend=.T.
Endif Enddo
Dele &&×îºóÒ»ÐÐΪ¿ÕÐУ¬É¾³ý
Wait \¹²×ª»»µÃµ½\Ìõ¼Ç¼£¡\hb1.Quit
*!* 75£®±¾³ÌÐòͨ¹ý½«Ôdbf±í¿½³Éexcel¸ñʽ,È»ºóµ¼Èë²¢ÉèÖñ¨±í¸ñʽ Para tablename
Local hb1 As excel.Application
Wait \ÕýÔÚµ¼³öÊý¾Ý£¬ÇëÉԺ\bhaveerror=.F. &&¶¨ÒåÒ»¸ö±äÁ¿ÅжÏÊÇ·ñ·¢Éú´íÎó Try
hb1=Createobject(\Catch
Messagebox(\Çë¼ì²éÄãÊÇ·ñÒÑ°²×°microsoft excelÓ¦ÓóÌÐò£¡\Ìáʾ\ bhaveerror=.T. Endtry
If bhaveerror=.T. Return Endif
If Right(curr_path,1)<>'\\' curr_path=curr_path+\Endif
ctablename=tablename+\filepath=curr_path+\*filepath=\If !File(filepath)
Messagebox(\Êý¾ÝÔ´µÄexcelÎļþδÉú³É£¬±¨±íÉú³É±»ÖÕÖ¹£¡\ Return Endif
HB1.workbooks.Open(filepath) HB1.SHEETS(\
hb1.sheets(1).Rows(1).entirerow.Insert hb1.sheets(1).Rows(1).entirerow.Insert Sele (ctablename) nfieldcount=Fcount() nreccount=Reccount()
hbdygs=\HB1.Range(hbdygs).Select
****ºÏ²¢Á½ÐÐ×÷Ϊ±¨±í±êÌâ*************
HB1.Selection.HorizontalAlignment = 3 &&ˮƽ·½Ïò 2×ó¶ÔÆ룬3¾ÓÖУ¬4ÓÒ¶ÔÆë HB1.Selection.VerticalAlignment = 2 &&´¹Ö±·½Ïò 1¿¿ÉÏ£¬2¾ÓÖУ¬3¿¿Ï HB1.Selection.WrapText = .F. && ?? HB1.Selection.Orientation = 0 && ?? HB1.Selection.AddIndent = .F. && ??