SET TALK OFF SET ECHO off SET CENTURY ON thisform.text2.Value="NEWDNC" THISFORM.Olecontrol3.Visible=.T. GETDIR() local lcfile lcfile=getfile() if empty(lcfile) thisform.text2.setfocus() thisform.text2.Value=SPACE(10) else thisform.text1.Value = lcfile SET DEFAULT TO e:\samerqda LOCAL lcTableName lcTableName = thisform.text2.value CREATE TABLE &lcTableName (char1 c(10), char2 c(70),char3 c(10), char4 c(10),char5 c(10), char6 c(40),fld10 c(40)) NOCPTRANS) APPEND FROM (thisform.text1.value)TYPE XLS GO TOP DELETE NEXT 1 SET DELETED on REPORT FORM nes preview *REPORT FORM NES TO PRINTER PROMPT PREVIEW IN WINDOW myPreviewForm *REPORT FORM nes TO PRINTER PROMPT PREVIEW m.a=thisform.text2.Value CLOSE all USE (m.a) gcDelimName = ALIAS( ) + '.xls' gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls') IF EMPTY(gcDelimFile) && Esc pressed CANCEL ENDIF COPY TO (gcDelimFile) xls for recno()>2 && or 1 MODIFY FILE (gcDelimFile) NOEDIT ENDIFthanks.