Hello, I have a workbook which returns over 220,000+ records from an Oracle DB. It works great in Excel 2010 & 2013 but when I shared it with a co-worker running 'Office 365 Pro' it only returned 65,535 records. I am using ADODB.Recordset to hold the data and output it to Range("A2") using CopyFromRecordset. There is no error but it won't go past 65K rows even though 365 has over 1M rows. Any ideas or suggestions?
Thanks for any ideas or suggestions,
Tim
Code:
Dim FldCount As Long, NbrFormat As String
' Copy field names to the first row of the worksheet
FldCount = RS.Fields.Count
For f = 1 To FldCount
NbrFormat = ""
Select Case LCase(Left(RS.Fields(f - 1).Name, 1)) 'NbrFormat
Case "s": NbrFormat = "@"
Case "n": NbrFormat = "_(* #,##0.00_)[Black];_(* (#,##0.00);_(* ""-""??_)[Red];_(@_)" ' "#,##0.00[Green]"
Case "d": NbrFormat = "mm/dd/yyyy"
Case Else: NbrFormat = "@"
End Select
XLWS.Columns(f).NumberFormat = NbrFormat
With XLWS.Cells(1, f)
.Value = Mid(RS.Fields(f - 1).Name, 2)
.Font.Bold = True
.HorizontalAlignment = xlCenter
.Interior.Color = rgbAquamarine
End With
Next
XLWS.Cells(2, 1).CopyFromRecordset RS
Thanks for any ideas or suggestions,
Tim