CLEAR
cStr="第一百零七章 好事多磨"
=ALINES(Astr,cStr,"第","章")
nLen=0
cLstr=""
cRstr=""
cStr1=astr[2]
* 左取两个字符
IF LEFT(cStr1,2)="十" AND LEN(cStr1)>2
cLstr="1"
cStr1=cLstr+SUBSTR(astr[2],3)
ENDIF
* 右取两个字符
DO CASE
CASE RIGHT(cStr1,2)="十" AND LEN(cStr1)=2
cRstr="10"
...
EOLE=CREATEOBJECT('EXCEL.APPLICATION')
LCFILENAME=GETFILE([XLS]) && 此处 XLS 改为EXCEL2010文件的扩展名
IF EMPTY(LCFILENAME)
RETURN
ENDIF
EOLE.WORKBOOKS.OPEN(LCFILENAME)
EOLE.WORKSHEETS(1).ACTIVATE
LNROW=EOLE.SHEETS(1).USEDRANGE.ROWS.COUNT
LNCOL=EOLE.SHEETS(1).USEDRANGE.COLUMNS.COUNT
DIM...