Opening data sets in excel that are too large for excel

Courtney93

New Member
Joined
Feb 16, 2012
Messages
3
Hey Guys!!:) I've got a dataset that is too large for excel, (a few million rows when the limit is 1048576)

To overcome this I've been copy and pasting within this limit which is time consuming, is there any way to automatically paste excess data into the next column?

Thanks in advance!!!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Maybe the whole dataset doesn't need to be loaded to worksheets?

For example, if the (incoming) dataset is in a recordset object that recordset can be used to create a pivot table without loading the data to a worksheet. Refer this thread http://www.mrexcel.com/forum/showthread.php?t=315768

Or if you have the recordset and want to paste to multiple sheets, this codes shows an approach using CopyFromRecordset MaxRows (Excel help refers)
Code:
  With objRS
 
    .Open YourSQL, YourConnection
 
    'Save headers in array for quick pasting to worksheet
    ReDim arHeaders(1 To 1, 1 To .fields.Count)
    For i = 0 To .fields.Count - 1
      arHeaders(1, i + 1) = .fields(i).Name
    Next i
 
    'transfer recordset to workbook one page at a time
    j = 0
    Do While Not .EOF
      j = j + 1
      Set wks = wbk.Worksheets.Add(After:=wbk.Worksheets(j))
      wks.Name = "Data" & Format$(j, "00") & " at " & Format$(Now, "h.mm am/pm d-mmm-yy")
      wks.Range("A1").Resize(, i).Value = arHeaders
      wks.Range("A2").CopyFromRecordset Data:=objRS, MaxRows:=MaxWksRows
    Loop
    .Close
  End With
  Set objRS = Nothing
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top