Spreadsheet Formatter

Load a formatted sample, then format other spreadsheets to match it.

  1. 1
    Load a sampleA spreadsheet that already looks the way you want: header rows, colors, widths, number formats.
  2. 2
    Check what was foundSee the formatting the tool picked up and untick anything you don't want copied.
  3. 3
    Format your filesAdd plain .csv or .xlsx files, or a zip of them, and download them formatted like the sample.

Drop a sample spreadsheet here

Use a .xlsx formatted the way you want your files to look. A few rows of example data help it pick up column formats and banding. Nothing leaves your browser.

What makes a good sample?
  • An .xlsx saved from Excel (or Google Sheets, or LibreOffice) with the look you want: title rows, column names, fills, fonts, borders, widths, frozen panes.
  • The column names your other files use, spelled the same way. That's how columns get matched.
  • A few rows of real-looking data under the header, so the tool can tell which columns hold dates or numbers and whether rows are banded.
  • Only the first sheet is used unless you pick another one.
Things a sample can't pass on: conditional formatting, formulas, data validation, images and comments. The tool lists any it finds.

Excel macro

Does the same job inside Excel, with nothing to install. It uses your sample workbook as a template, so everything in the sample is copied, including conditional formatting and data validation. Because of that, the "Formatting found" checkboxes don't apply to the macro. Column matching works the same as on this page.

How to use it
  1. In Excel, press Alt+F11 to open the Visual Basic editor.
  2. Choose File > Import File and pick SpreadsheetFormatter.bas. (Or choose Insert > Module and paste the copied macro.)
  3. Close the editor, press Alt+F8, choose FormatFiles and click Run.
  4. Pick the sample workbook, then the files to format. A report opens when it's done.

To keep the macro, save the workbook it's in as .xlsm, or import it into your Personal Macro Workbook. Some organizations block macros; if Excel won't run it, ask IT. Reading CSV files needs Excel for Windows; .xlsx files work on a Mac too.

SpreadsheetFormatter.bas

      

Script

You don't need this to format files on this page. It's the same formatting as a Python script, for running on your own computer: on a whole folder, on a schedule, or without this page. It needs Python 3 and installs openpyxl on its first run.

  

        

      
Advanced: formatting rules as JSON
Only checked items are included