You can import files into Excel in just a few minutes—whether from a document, web page, or database—and turn raw data into structured, usable spreadsheets. The key is knowing the right method for your file type and Excel version. Below, you’ll find step-by-step instructions for everything from simple CSV imports to handling complex Excel tables. No professional background is needed, but you’ll want to check your file format and compatibility before proceeding.
What You'll Need
- The file you want to import (common types: CSV, TXT, XLSX, PDFs with tables, web data).
- Microsoft Excel (desktop or online).
- For CSV or text files: a compatible file format (comma/tab/delimited).
- If importing from a web page, a browser like Chrome, Firefox, or Edge.
- Optional: a backup of your original file (especially for PDFs or large spreadsheets).
Step-by-Step
- Open Excel and prepare your workspace. Launch Excel (desktop or online) and create a new blank workbook. If you’re importing data to replace or append to an existing sheet, save it first. Labels can differ slightly by version or region, so check the top-left corner for your file type (e.g., “XLSX” or “CSV”).
-
Choose the import method based on your file.
- For CSV or TXT files: Use Data > Get Data > From File > From Text/CSV. In Excel 2016+ or newer, this is the simplest path. On older versions, go to Data > Get & Transform Data > From File > From Text/CSV. If the file is large, Excel may prompt you to open it in Power Query instead. Proceed only if prompted.
- For Excel files (XLSX): Use Data > Get Data > From File > From Workbook. This merges the file into your workbook. If you only need specific sheets, select them before importing.
- For PDFs with tables: Use Data > Get Data > From File > From PDF (Excel 2016+). If the table isn’t detected, manually insert it by selecting Data > Get Data > From Web > From URL and entering the PDF’s web preview (not the full file). For older versions, open the PDF in a browser, copy the table, and paste it into Excel.
- For web data (e.g., web tables): Use Data > Get Data > From Web. Paste the URL of the webpage containing the table, then click Edit in Power Query to refine the data before loading.
- For databases (SQL, Access): Use Data > Get Data > From Database > From ODBC (for SQL servers) or From Microsoft Access. Enter connection details and select tables.
- Specify the file location. In the import wizard, browse to your file on your PC or cloud storage (e.g., OneDrive) and select it. Excel will either open the file directly (for XLSX) or prompt you to load it as a dataset (for CSV/TXT).
- Choose how to handle data. For CSV or text files, Excel may ask to Load to Data Model (for complex data) or Load to Table (for simple use). Select Load to Table to create a new worksheet. For existing data, choose Append Query Results to merge into the sheet.
-
Review and validate. After loading, check the imported data in the new worksheet. Look for:
- Correct headers (column titles).
- No duplicate entries or missing values.
- Proper data types (numbers, dates, text).
- Save your workbook. Before closing, save as Excel Workbook (.xlsx) to preserve formatting. For large files, save frequently to avoid corruption.
Common Mistakes
- File format mismatch: Forgetting to open the correct file type (e.g., importing a PDF as CSV). Always check the file extension and choose the right import method.
- Incorrect delimiters: CSV files use commas by default, but some files use tabs or semicolons. Click Edit Delimiters in the import wizard to specify.
- Large file size limits: Excel has a 1GB limit for some operations. For files over 1MB, use Power Query or export to a database first.
- Missing headers: If Excel can’t detect headers, add them manually in the new worksheet. Use Data > Transform > Add Column > Insert Column to create them.
- Permissions errors: If the file is locked (e.g., on shared drives), ensure you have access. Try right-clicking the file and selecting Open With > Excel instead of importing.
Tips
- Preprocess files: Clean data before importing (remove duplicates, standardize formats) using tools like Excel’s Find & Select > Find & GoTo.
- Use Power Query for complex data: For large datasets or irregular formats, edit the import in Power Query Editor (View > Query Group > Query Editor) to reshape columns and filters.
- Test with a sample: Import a small portion first to verify formatting before full loads.
- Enable background refresh: For dynamic data (e.g., web tables), enable Data > Refresh All in Power Query to auto-update.
- Backup data: Always save a copy of your original file before importing, especially for critical spreadsheets.
Troubleshooting
- Excel won’t open the file:
- Check the file extension and use the correct import path (e.g., From File > From Text/CSV for .txt).
- Restart Excel and try again.
- Run Excel as Administrator (right-click > Properties > Compatibility) to resolve permissions errors.
- If all else fails: Import the file manually by copying-pasting from a browser or Notepad, then pasting into Excel.
- Data appears blank or corrupted:
- Ensure the file is not password-protected. Open it in another program first.
- Check for hidden characters or encoding issues. In Excel, go to File > Options > Proofing > AutoCorrect Options > Hidden Text to verify.
- Reimport the file, but this time select From Text/CSV with Delimited format.
- Import fails with an error code:
- Error code 53 (e.g., "Invalid file type") means the file isn’t recognized. Try converting it to CSV or re-saving it.
- Error code 71 (e.g., "Cannot load") often means the file is corrupted. Download it again from the source.
- For web imports, verify the URL is correct and the page loads in your browser.
- Power Query crashes: Close all other Excel programs, restart your PC, then retry. If the issue persists, update Excel to the latest version.
Frequently Asked Questions
How do I import a large Excel file into Excel?
For files over 1MB, use Power Query to load the data first, then transform it in the editor. Select From File > From Workbook, choose the sheet, and click Load to move data into a table.
Can I import a PDF into Excel without tables?
No. Excel only recognizes tables in PDFs via Get Data > From File > From PDF. If the PDF lacks tables, you must extract text manually (e.g., using browser tools) or copy-paste into Excel.
What if my CSV file has no headers?
Excel will prompt you to add headers. Click Edit Headers in the import wizard and type column names manually. For large files, use Power Query > Transform Data > Add Column > Index Column to generate headers automatically.
How do I import data from a web page into Excel?
Use Data > Get Data > From Web. Paste the webpage URL, then click Edit in Power Query to filter columns. Load the table by clicking Close & Load.
Why is my imported data not matching the original?
Check for these issues:
- Data types (e.g., dates formatted as text).
- Hidden or special characters (e.g., tabs vs. spaces).
- Different delimiter styles (e.g., commas vs. semicolons). Use Edit Delimiters to resolve.
Can I import a database into Excel using a free tool?
Yes, but only for basic tables. Use Get Data > From Database > From ODBC (if available) or Microsoft Query (older versions). Free alternatives like OpenRefine can export data to CSV before importing.