作者:Tiger5392
转载:https://bbs.bccn.net/thread-210804-1-1.html
oWMI=CREATEOBJECT("WbemScripting.SWbemLocator")
oLocal=oWMI.ConnectServer(".", "root\cimv2")
oHardware=oLocal.ExecQuery("SELECT * FROM Win32_PhysicalMedia")
FOR EACH object1 IN oHardware
lcHDID=object1.Properties_('Serial...
来源:https://bbs.csdn.net/topics/340141130
作者:十豆三
* VFP8.0 Or VFP9.0
m.llExit=.T.
Try
m.Excel=Createobject("Excel.Application")
m.Excel=Null
Catch
m.llExit=.F.
Endtry
If m.llExit=.F.
Messagebox("没有安装 Excel!",48,"信息提示")
Return
Endif
来源:https://bbs.csdn.net/topics/390991766
作者:回马枪
Clear
? UrlEncode(' test,这是一个测试', .F.) && .F. --> "+", .F. --> "%20"
Function UrlEncode(tcString, tlNoPlus)
Local lcReturn, lcChar, lnCounter
m.lcReturn=""
For m.lnCounter = 1 To Len(m.tcString)
m.lcChar ...
来源:https://bbs.csdn.net/topics/391962702
作者:都市夜猫
Local cCurDir, cNewDir, cDbf, cXls, ii
Local array aDbfs[1]
m.cCurDir = Sys(5) + Curdir()
m.cNewDir = GetDir('', '选择要被转换的 Excel 文件所在的文件夹。', '选择文件夹', 1+64)
If Empty(m.cNewDir)
*--
Else
Clear
ChDir (m.cNewDir)
...
在EXCEL中,将日期型数据:2021-04-20 转换为文本数据后,其值变为 44306,如何在VFP中将44306 转换为日期型数据:2021-04-20
解决方案:
? DATE(1899, 12, 30) + 44306
转换结果:2021-04-20
下面代码由都市夜猫提供:https://bbs.csdn.net/topics/392189538
nn = 14993.48827
IF nn < 60
日期 = {^1900-1-1} + INT(nn) - 1
ELSE
日期 ...
OPEN DATABASE "DATA1.DBC"
LNTABLES=ADBOBJECTS(ATABLE,"TABLE")
FOR LNI=1 TO LNTABLES
?ATABLE(LNI)
ENDFOR
a='20210414173928'
b= TRANSFORM(INT(VAL(a)),"@ 9999,99,99,99,99,99")
?DATETIME(&b)
CLEAR
TEXT TO lcText NOSHOW TEXTMERGE
62B19B11-B12A9B
62B19B11-A2B
62B19B10-B11J
62B19B10-0B
62B19B4-B10J
62B19B4-A2B
62B19-B25J
62B19-B4J
62B17-B19J
62B17-B2B
62B16A16B3A3-A4B18B
62B16A16B3A3-A7B
62B16A16B3-B4B14J
62B16A16B3-A3J
62B16A16-A17B
62B16A16-B3J
88B5-A3A4J
ENDTEXT
...
TEXT TO lcStr NOSHOW TEXTMERGE
Cryopreservation is the most efficient method for long-term preservation of mammalian sperm. However, freeze-thawing procedures may strongly impair the sperm function and survival and thus decrease the reproductive performance.
ENDTEXT
ALINES(laStr, lcStr, 4 + ...
LOCAL lOldSetOpt,mChanNum
lOldSetOpt = DDESetOption("SAFETY")
= DDESetOption("SAFETY",.F.)
mChanNum = DDEInitiate('Excel', 'SYSTEM') &&EXCEL是否已经打开
IF mChanNum # -1
= MESSAGEBOX('程序 EXCEL 已经打开,请先将其关闭!', 64, '系统提示!')
= DDETerminate(mChanNum)
= DDESetOption("SAFETY",lOldSe...
* A
* BCD
* EFGHI
* JKLMNOP
* QRSTUVWXY
CLEAR
ln = 0
FOR ln1 = 1 TO 5
? SPACE(5 - ln1)
FOR ln2 = 1 TO 2 * ln1 - 1
ln = ln + 1
?? CHR(ln + 64)
ENDFOR
ENDFOR