USE moh55 gcDelimName = ALIAS( ) + '.xls' gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls') IF EMPTY(gcDelimFile) && Esc pressed CANCEL ENDIF Exit_In_Xls("moh55",gcDelimFile) FUNCTION exit_in_xls PARAMETERS source_file,xls_file LOCAL expo_files, zik ,mm_name_part, limit_records SELECT (source_file) all_records = RECCOUNT() * one row reserved for the field header limit_records = 16383 && for VFP 7 * limit_records = 65534 && for VFP 8 and higher m_cycle = INT(all_records / 16383) + 1 && for VFP 7 * m_cycle = INT(all_records / 65534) + 1 && for VFP 8 and higher expo_files = "" FOR zik = 1 to m_cycle IF zik = 1 mm_name_part = xls_file ELSE mm_name_part = ADDBS(JUSTPATH(xls_file))+JUSTSTEM(xls_file)+ "_"+ALLTRIM(STR(zik-1,10,0))+"."+JUSTEXT(xls_file) SKIP ENDIF IF NOT EOF() EXPORT TO (mm_name_part) XL5 NEXT limit_records expo_files = expo_files + CHR(13)+CHR(10)+ mm_name_part ELSE EXIT ENDIF NEXT MessageBox(expo_files, 64, "EXPORT in:") RETURN zik && the number of .xls files >Vladimir Zografski