SmartQueryTools

Extract Head of Excel Files Online

Extract the first N rows from Excel files directly in your browser. Choose how many rows to keep and download the result — no upload required.

How to extract Head of Excel files

  1. Drop your file onto the upload area. The whole file is loaded, the total row count is shown and the first 200 rows are previewed.
  2. Enter how many rows to keep in the Number of rows box. The default is 100.
  3. Click Extract First Rows. The preview switches to show only the rows you kept.
  4. Click Download to save them in the same format you uploaded, with _head added to the file name.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A weather station logs a reading every ten minutes into one long file. An engineer wants a small slice to share in a bug report without sending the full year of data.

Input (Excel)

Excel workbook, first sheet (Sheet1)

stationreading_timetemp_chumidity_pct
WS-142026-07-01 00:00:0011.482
WS-142026-07-01 00:10:0011.183
WS-142026-07-01 00:20:0010.985
WS-142026-07-01 00:30:0010.8NULL
WS-142026-07-01 00:40:0010.686

Settings

  • Number of rows: 3

Result

stationreading_timetemp_chumidity_pct
WS-142026-07-01 00:00:0011.482
WS-142026-07-01 00:10:0011.183
WS-142026-07-01 00:20:0010.985

The first three data rows are kept in their original order and the header is carried over. Nothing is sorted, so "first" means first in the file, not earliest by timestamp. Here the file was already in time order, so the result is also the three earliest readings.

Working with Excel files

Only the first sheet is read, and its first row is used as the header. The row count shown after loading is data rows, so the first data row is spreadsheet row 2. Blank rows inside the sheet's used range are read as rows of empty cells and count toward N, so a sheet with spacer rows near the top can give fewer real records than you asked for.

The download is a new .xlsx workbook with a single sheet named Sheet1. Cell values are kept, but formatting, column widths, formulas and any other sheets are not. Dates are written into the new workbook as YYYY-MM-DD text, so reapply a date format in Excel if you need to calculate with them. This is useful for trimming a large workbook down to something small enough to email. Both the row count on screen and the number you type ignore the header row. Asking for 50 rows gives a sheet with 51 filled rows, the header plus 50 records.

Frequently Asked Questions

Will the head of my Excel file keep formulas?

No. Formulas are read as their last saved values, and the new workbook contains only those values.

Why does my Excel head file have empty rows?

The sheet had blank rows within its used range, and each one counts as a row. Delete the blank rows in Excel, or run the Filter tool to drop rows where a key column is empty, then take the head.

Does it read only the first N rows?

No. The whole file is loaded into the in-browser engine and counted first, then the first N rows are kept. Very large files are limited by the memory your browser can use, not by N.

What is the difference between Head and Sample?

Head keeps the first N rows in file order and gives the same result every time. Sample picks rows at random, which is better when the start of the file is not typical of the rest.

What if I ask for more rows than the file has?

You get every row. If the box is empty or not a number, the default of 100 is used. 0 and negative numbers are treated as 1, so you always get at least one row.

Related Tools