I am using VFP 5.0 and Excel 5.0 to generate Excel reports from SQL Server 6.5 data.
The following VFP code creates mutliple spreadsheets in a single workbook. It seems to work just fine. The problem is that the scan is scanning 250,000+ records and it takes several DAYS to comnplete.
Am I doing anything in the code to slow this down? Is there a faster way to do this? (There just HAS to be a way to do this faster.)
The output will always have more than 64k rows, so it will not fit into a single spreadsheet, so I am creating multiple spreadsheets as needed, limiting each spreadsheet to approximately 30,000 rows.
I do not have the option of creating multiple WORKBOOKS because the final WORKBOOK is being e-mailed to the user and the user/customer wants to be able to easily navigate this report. Multiple WORKBOOKS would only confuse them and would also cause me to fall short of what they were promised.
So-o-o-o-o, I would appreciate any help I can get from good old Universal Thread.
Bob
**************************************************************
l_nRow = 5
SELECT &lzipname
wait window 'Now process ' + lzipname
SCAN
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,1].VALUE = &lzipname..lt_desc
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,2].VALUE = &lzipname..li_name
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,3].VALUE = ALLTRIM(&lzipname..na_zip)
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,4].VALUE = ALLTRIM(&lzipname..country)
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,5].VALUE = &lzipname..gn_male
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,6].VALUE = &lzipname..gn_female
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,7].VALUE = &lzipname..gn_unkn
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,8].VALUE = &lzipname..na_home
o.worksheets("sheet"+allt(str(i))).cells[l_nRow,9].VALUE = &lzipname..na_busines
l_nRow = l_nRow + 1
ENDSCAN
**************************************************************
Database Development Team