I am using a memory table linked to a Query.
The result of this query can be 600.000 records. Inside a "For all"
loop I am filtering on this table. The filtering item (sWaarde) is
found in query QRY_Cadency_files. The result of the filtering must be
exported into an Excel file.
It seems that the table is not yet finalized when the export is
started. Resulting in unreadable XLSX or XML files.
Is there a way to have the program only export when the loading of the
table is finished?
For now I have put a multitask, but this is not helping. Small files
are exported correctly.
This is the code:
HExecuteQuery(QRY_Cadency_files)
FOR ALL QRY_Cadency_files ON Cadency
sWaarde=QRY_Cadency_files.Cadency
openfile=folder+"\"+maand+"_"+Process_cntry+"_"+companie+"_"+sWaarde+".xlsx"
TableEnableFilter(Table_Ageing.COL_Cadency,filterEqual,sWaarde)
IF TableCount(Table_Ageing)<>0 THEN
IF TableCount(Table_Ageing)> 80000 THEN
Multitask(1000)
TableToExcel(Table_Ageing,Openfile,taColumnsTitles)
Multitask(1000)
ELSE
TableToExcel(Table_Ageing,Openfile,taColumnsTitles)
Multitask(100)
END
END
PROGBAR_export++
END
I am using WINDEV 22