Import from excel workbook with more than 65536 rows

willwall

New Member
Joined
Sep 22, 2016
Messages
44
Office Version
  1. 365
Platform
  1. Windows
I have been using power query to import data from an excel workbook which has worked great. The problem is that now the data on the excel workbook i am importing from has gone over to 2 sheets (maxed out rows). Is there a way to get query to import the data from 2 sheets?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Which version of Exel are you using? I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’).

All the recent Excel versions (since 2003, I believe) that use the "xlsx", "xlsm", or "xlsb" formats allow for over 1 million rows of data on an Excel sheet.
 
Upvote 0
Hello Joe4..
I have updated my account details now. I am using office 365 version 2110.
1637326704679.png
 
Upvote 0
Is this Excel file being generated outside of Excel, from another program, perhaps?
Perhaps it is exporting it in the old "xls" Excel format.

If you do a "Save As", and save it as the Excel option that shows the "xlsx" extension, it should increase your total rows.
 
Upvote 0
Yes it is being generated by another program. I saved it to "xlsx" and it still wants to go over to sheet 2 despite the fact that it hasn't reached 1 mil rows on sheet one?

1637327950279.png
 
Upvote 0
Yes it is being generated by another program. I saved it to "xlsx" and it still wants to go over to sheet 2 despite the fact that it hasn't reached 1 mil rows on sheet one?

View attachment 51644
What still wants to go over to sheet 2?
If you change the format of the Excel sheet after the data has been generated, and the program has already spit out to two sheets, changing the format at that time (after the fact) is too late.
If the program you are exporting the Excel file from is itself spitting it out to two sheets, do you have the ability to export it to the "xlsx" format instead of the "xls" format?

If not, then I would recommend fixing it after the fact, i.e. either manually updating it or using VBA to:
- changing the format from "xls" to "xlsx" to get the additional rows
- copy the data from Sheet2 to the bottom of Sheet1

Assuming that there are less than 1 million rows, you would then have all the data on Sheet1 and could proceed with your Power Query task.
 
Upvote 0
The program that I use to export the excel file is splitting it into 2 sheets. Looks like the best option is manually copying sheet 2 over to sheet one. Is there a vba code for this? I could also do it manually I suppose.
 
Upvote 0
This code would copy the data and delete sheet 2.
VBA Code:
Sub MyCopyData()
    Sheets("Sheet2").Range("A1").CurrentRegion.Copy Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
    Application.DisplayAlerts = False
    Sheets("Sheet2").Delete
    Application.DisplayAlerts = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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