请教如何把EXCEL2016文件导入到VF中来
现有一个EXCEL固定的表65列,每列都
名册.zip
(21.56 KB)
是字符型,想导入到VF中来处理,如何用程序导入请大神出个成品,能直接使用的。谢谢
oExcel = CREATEOBJECT('Excel.Application') WITH oExcel .WorkBooks.Open(SYS(5) + SYS(2003) + "\名册.Xlsx") .ActiveSheet.UsedRange.Select WITH .Selection .Columns.AutoFit nRow = .Rows.Count - 1 nColumn = .Columns.Count - 0 LOCAL ArrayName[nRow, nColumn] ArrayName = .Cells(2, 1).Resize(nRow, nColumn).Value ENDWITH .DisplayAlerts = .F. .WorkBooks.Close .Quit ENDWITH lcStr = "序号 N(2)" FOR lnj = 1 TO 64 lcStr = lcStr + ", F" + TRANSFORM(lnj) + " C(40)" ENDFOR CREATE CURSOR test (&lcStr) INSERT INTO test FROM ARRAY ArrayName LOCATE BROWSE
[此贴子已经被作者于2021-7-1 09:25编辑过]