Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 93 ยท Getting Started

Saving, File Formats and Sharing

Choose the right Excel file format, understand what CSV loses, save as PDF, co-author in the cloud, use version history, and protect files with passwords.

Saving looks like the simplest topic in Excel, but the format you choose decides what survives. An .xlsx file keeps formulas, formatting and charts; a .csv file keeps only values as plain text; an .xlsm file can carry macros while .xlsx cannot. Picking the wrong one is how people lose formulas or accidentally email a macro-enabled workbook that gets blocked.

In this lesson you will learn the main file formats, what CSV drops, how to export to PDF, how sharing and co-authoring work, and what protection and passwords do and do not provide. Excel cannot run on this site, so file dialogs are described in text. The one thing we can demonstrate honestly is what a CSV round trip does to your data, using a Python stand-in with the csv module and pandas.

Pick the format by the job

XLSX Default. Formulas, formats, charts.
XLSM Same plus macros.
CSV Plain values only.
PDF Read-only picture for printing.
1 / 2

Saving basics

  • Ctrl+S saves in the current format. The first time (or via File โ†’ Save As) Excel asks for a location and a Save as type.
  • Save As creates a new file and leaves the original as it was. Use it for variants, such as budget-2026.xlsx from budget-2025.xlsx.
  • F12 opens Save As directly.
  • AutoSave (a toggle at the top left) saves continuously, but only for files stored in OneDrive or SharePoint. It writes changes into the same file, so make a copy before experimenting on an important workbook.
  • AutoRecover (File โ†’ Options โ†’ Save) keeps temporary recovery copies, every ten minutes by default, in case Excel crashes. It is a safety net, not a backup.

Choose short, meaningful file names without special characters. Putting a date in ISO form (2025-03-15) makes files sort in time order.

The main file formats

Extension Name Keeps formulas and formatting Macros Typical use
.xlsx Excel Workbook Yes No Everyday default
.xlsm Macro-Enabled Workbook Yes Yes Workbooks with VBA
.xlsb Binary Workbook Yes Yes Very large files; smaller and faster to open
.xltx / .xltm Template Yes No / Yes Starting points such as an invoice
.xls Excel 97-2003 Mostly Yes Old compatibility only
.csv Comma-separated values No No Exchanging data with other programs
.txt Text (tab-delimited) No No Simple exchange
.pdf PDF Not editable No Fixed layout for reading or printing
.ods OpenDocument Mostly Limited LibreOffice compatibility

The Save As list holds several more text formats, and they differ in details that matter when another program reads the file:

Format What changes
CSV UTF-8 (.csv) Comma-separated, UTF-8 encoding: the safe choice for names with accents or non-Latin letters
CSV (.csv), plain Comma-separated in the system's ANSI code page; characters outside it become ?
CSV (Macintosh) and CSV (MS-DOS) Same data, but with the line endings and character set of classic Mac OS or DOS; only for very old software
Unicode Text (.txt) Tab-delimited, UTF-16; keeps every character but is large and not readable by simple tools
Formatted Text (.prn) Space-delimited with fixed column widths, a printout in text form; it saves only the active sheet and long cells are cut
SYLK (.slk) and DIF (.dif) Old data-exchange formats from the first spreadsheet programs; they keep values but few other features

Every one of these formats saves one sheet only (the active one) and no formulas. Excel warns you each time, and you should believe it.

An .xlsx file is actually a ZIP archive of XML files, which is why it is open and widely supported. Excel refuses to store VBA in .xlsx: if your workbook has macros and you try to save as .xlsx, a warning tells you the macros will be lost. See Macros and the Macro Recorder.

.xlsb stores the same information in a compact binary form. It can open large workbooks noticeably faster, but other tools read it poorly, so keep it for internal heavy files.

What CSV loses

A CSV file is plain text: one row per line, values separated by commas (or semicolons in regions that use the comma as a decimal mark). When you save a workbook as CSV, Excel keeps only the active sheet, writes the displayed result of every formula (the formulas are gone), and drops formatting, column widths, charts, colors, validation and multiple sheets. Excel warns you about this, and many people click through it.

The reverse also bites: opening a CSV by double-clicking applies Excel's guessing. Leading zeros vanish, long numbers turn to scientific notation, and some gene names or codes become dates. Importing Data from CSV, Text and the Web shows the safe way: Data โ†’ From Text/CSV lets you check delimiters, encoding and data types before loading.

Excel offers several CSV flavors: CSV UTF-8 (Comma delimited) is the best default today because it keeps accented letters and non-Latin scripts correctly. The older CSV (Comma delimited) uses the system's legacy code page, which can corrupt international characters in other programs.

A CSV round trip

The stand-in below plays the part of "save as CSV, then open it again". It uses Python's csv module to write a small table and pandas to read it back, which loses the zeros in the ZIP code unless the column is read as text. This is not what Excel runs internally, but it reproduces the exact kinds of damage Excel causes.

Python CSV round trip: what survives?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Look at the ZIP column in the guessed table: 02134 became 2134 and 00501 became 501, a number with its zeros gone. The dtype=str version keeps them. The quoted customer name Ada, Inc. and the note with quotes both survive, because the CSV writer wraps such values in double quotes and doubles the inner quotes. And nowhere in the file is there any trace of the Total formula.

How delimiters differ by region

In countries that write 1.234,56, Excel uses ; as the list separator, so its "CSV" files are semicolon-separated. A file made on one machine may then open in a single column on another. The stand-in below shows the same data written both ways and the single-column mistake.

Python Comma versus semicolon: opening with the wrong delimiter

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

With the wrong assumption you get a single column header, Item;Price, and the decimal comma in 2,50 splits each row into mangled pieces (Tea;2 and 50); with the right separator and decimal mark you get two columns and a numeric Price you can add. Excel's import wizard lets you set the same delimiter and the locale for numbers.

Saving as PDF and printing

File โ†’ Export โ†’ Create PDF/XPS (or Save As โ†’ PDF) produces a fixed-layout document anyone can open. Before exporting, set up the page: Page Layout โ†’ Print Area, orientation, Fit to 1 page wide, and repeating header rows (Print Titles). Options let you publish the selection, the active sheets or the whole workbook. A PDF is for reading; it cannot be turned back into a working spreadsheet.

Sharing and co-authoring

If the file lives in OneDrive or SharePoint, the Share button creates a link with permissions: can view or can edit, optionally limited to named people or an organization. Several people can then edit at the same time (co-authoring) and see each other's cursors. Excel for the web and the desktop app can both join. Co-authoring has some limits: not every feature (such as certain macros or older shared-workbook settings) is available while others are editing.

Advantages over emailing attachments: one version of the truth, comments in one place, and no "final_v7_REAL.xlsx". If you must email a copy, send a link when possible, or a PDF if the recipient only needs to read.

Version history

For cloud files, File โ†’ Info โ†’ Version History (or the file name menu at the top) lists earlier versions with date and author. Open an older one to inspect it, Restore it, or copy numbers back into the current file. This is the best protection against a bad edit that was already saved. Files that only exist on your disk have no version history, so keep backups.

Protection and passwords

Excel has several layers, and they protect against different things:

  • Mark as Final and read-only recommended only discourage edits; they are not security.
  • Protect Sheet (Review tab) locks cells you have not unlocked, so people cannot overwrite formulas by mistake. It can have a password, but the lock is weak: it is meant to prevent accidents, not to stop determined users.
  • Protect Workbook Structure stops adding, deleting or renaming sheets.
  • Encrypt with Password (File โ†’ Info โ†’ Protect Workbook) is real encryption of the whole file. Without the password the file cannot be opened, and Microsoft cannot recover a lost password. Store it in a password manager.

Details of sheet protection, locked cells and hidden formulas are in Collaboration, Comments and Protecting Work.

Before sharing a workbook outside your organization, run File โ†’ Info โ†’ Check for Issues โ†’ Inspect Document. It finds hidden sheets, hidden rows and columns, comments, personal information in properties, and leftover data that you may not want to send.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. You save a workbook as CSV. What happens to its formulas?

    CSV is plain text, so each cell is saved as its displayed result and the formulas are lost.
  2. 2. Which format should you choose for a workbook that contains VBA macros?

    Only macro-enabled formats such as .xlsm (or .xlsb and .xls) can store VBA code. A .xlsx file drops macros.
  3. 3. A CSV file opens with all data crammed in column A, with entries like Item;Price. What is the likely cause?

    The delimiter assumed on opening differs from the one in the file. Use Data โ†’ From Text/CSV or Text to Columns and choose the right delimiter.
  4. 4. What does encrypting a workbook with a password (File โ†’ Info โ†’ Protect Workbook) mean if you forget the password?

    The encryption is real, and there is no recovery service. Keep passwords in a password manager.
  5. 5. Which feature lets you return to yesterday's saved state of a OneDrive workbook?

    Version History keeps earlier saved versions of cloud files. AutoRecover only helps after a crash.

Summary

  • .xlsx is the default; .xlsm adds macros; .xlsb is compact for huge files; .csv keeps only values of one sheet.
  • Open CSV through Data โ†’ From Text/CSV to control delimiter, encoding and data types, and prefer CSV UTF-8.
  • Export to PDF for a fixed layout; set the print area and fit-to-page first.
  • Cloud files support co-authoring and Version History; attachments create diverging copies.
  • Sheet protection prevents accidents; only password encryption of the file is real security, and a lost password cannot be recovered.

Next: Your First Formulas.