Skip to content
Bugwise
Menu
Features & Flows

File Export and Download

Test exports and downloads, from "does the file match the screen" to CSV in Excel (encoding, separators, leading zeros, formulas), PDFs, big asynchronous exports, download links and mobile, then hunt six bugs in a restaurant portal's CSV export.

35–55 min intermediate Mobile & web

The accountant of a small restaurant chain exported last month’s orders, opened the file in Excel and sent the totals to the tax office. Three weeks later, the numbers didn’t add up. The export had included canceled orders, every name with “ć” looked like “ć”, and two catering orders over €1,000 had their amounts split across two columns, so the sum skipped them.

The export button “worked”: a file was downloaded every time. But an export is only as good as what the user can do with the file. This lesson shows what to check, from the first click to the file open in someone else’s software.

Part Not started

What an export must get right

Exports appear everywhere: orders and invoices in admin panels, reports and dashboards, bank statements, contacts, calendar events, the user’s own data under privacy laws such as the GDPRGDPRThe EU's General Data Protection Regulation: rules for how personal data is collected, used, stored and deleted.Open in glossary → (see Account and Settings).

Formats you’ll meet

FormatTypical useFirst things to check
CSVCSVComma-separated values: a plain text file with one row per line and values separated by commas (or semicolons).Open in glossary →Lists for Excel or other systemsEncoding, separator, quotes, numbers and dates
XLSX (Excel)Reports people will editCell types, sheet names, formulas, column widths
PDFInvoices, tickets, statements to print or keepLayout, fonts and letters, page breaks, totals
JSONJSONA simple text format for data, used by most APIs, like {"name": "Anna", "age": 31}.Open in glossary →Data exports, imports into other toolsValid file, field names, complete data
ICS“Add to calendar”Time zone, start and end, reminders
ZIPMany files at once (photos, documents)Every file inside, folder names, opening on Windows and Mac

The core check: file = what the user asked for

Compare the file with the screen, cell by cell, for a small and known set of data:

  • Scope. Selected rows only, the current page, or everything? With the active filters and search applied? The button label (“Export 12 orders”) must match the file.
  • Columns. The same columns as the screen, or a documented different set. No hidden internal fields (internal IDs, cost prices, other users’ emails).
  • Order. The same sort as on screen, unless the spec says otherwise.
  • Values. Same totals, same statuses, same rounding. Dates and times in the same time zoneTime zoneThe local time of a region. Bugs appear when apps mix up the user's time zone with the server's.Open in glossary → as the screen, or clearly labeled.
  • Edge data. Zero rows (an empty file with headers, or a clear message), one row, and the largest realistic export.

Check this part

  1. The screen shows 12 orders filtered by "Refunded". The CSV contains 340 rows. What's wrong?

  2. Which test data is most useful before testing an export?

What an export must contain, which formats you'll meet, and the core check: the file matches what the user asked for.

Part Not started

CSV in Excel: where most export bugs live

A CSV file is plain text: values separated by commas, one row per line. That simplicity is the problem. The file has no types (number, text, date) and doesn’t say which separator or which encodingCharacter encodingHow letters are stored as bytes in a file. UTF-8 covers every language; a mismatch turns "ć" into "ć".Open in glossary → (the way letters are stored as bytes) it uses, so Excel guesses. Most users open CSV files by double-clicking them in Excel, so test it that way.

Two words you’ll need below:

  • UTF-8 is the standard encoding today. It can store every alphabet (č, ć, ß, Cyrillic, Arabic). A BOM (byte order mark) is a few invisible bytes at the very start of a file that say “this file is UTF-8”. Excel needs it; most other programs don’t care.
  • The separator Excel expects comes from the computer’s regional settings. Where the decimal mark is a comma (much of Europe), Excel expects semicolons between values, not commas.

You’ll also want a plain text editor (Notepad on Windows, TextEdit on Mac) next to Excel. It shows exactly what’s in the file, without any guessing.

Try the combinations below. Start with the defaults, then fix one thing at a time:

customers.csv · opened by double-click in Excel

File format

Excel’s regional settings

Separator in the file

The file in a text editor

Customer,Phone,Order ID,Total
Ana Ćirić,0641234567,202611090000001234,1240.50
Đorđe Šimić,0659876543,202611090000001235,86.00
Mila Novak,0601112223,202611090000001236,312.90

The same file in Excel

A
1Customer,Phone,Order ID,Total
2Ana Ćirić,0641234567,202611090000001234,1240.50
3�orđe Šimić,0659876543,202611090000001235,86.00
4Mila Novak,0601112223,202611090000001236,312.90
  • ⚠ Letters like Ć, Đ and Š are garbled: Excel read the UTF-8 file in an old encoding. Adding a BOM tells it the file is UTF-8.
  • ⚠ Everything is in one column: the file uses ",", but Excel in this region splits on ";".

The usual suspects

ProblemWhat the user seesWhat the export should do
Encoding“Ćirić” instead of “Ćirić”Write UTF-8 with a BOM, so Excel knows the encoding
SeparatorEverything in column AMatch the users’ region (semicolon where the decimal mark is a comma), or offer XLSX
Leading zeros0641234567 becomes 641234567Phone numbers, postcodes and IDs exported as text, or XLSX with text cells
Long numbersAn 18-digit order ID becomes 2.02611E+17 (Excel’s short form for a huge number) and the last digits are lostSame: as text. Excel keeps only 15 significant digits.
Dates03/04/2026 read as March 4 in one region and April 3 in anotherAn unambiguous format such as 2026-04-03, and a stated time zone
Commas, quotes, line breaks in values“Blue Harbor, d.o.o.” splits into two columnsQuote such values: "Blue Harbor, d.o.o.", and double any quotes inside
Numbers with formatting“1,240.00” splits into two cells or stays textPlain numbers in the file (1240.00), formatting only in XLSX

Formulas in exported data

If a value starts with =, +, - or @, Excel may treat it as a formula. A user who signs up with the name =HYPERLINK("http://evil.test","Refund form") turns into a clickable link in the export that the restaurant’s accountant opens. This is CSV injectionCSV injectionUser-entered text that starts with =, +, - or @ and runs as a formula when an exported file is opened in a spreadsheet.Open in glossary →. The export should neutralise such values, usually by adding an apostrophe or a space before them.

To test it, use a harmless value in a text field that ends up in an export, such as a name like =1+2. If the exported cell shows 3, report it.

Check this part

  1. In Excel, "Ćirić" appears as "Ćirić", but the file looks fine in a text editor. What's the most likely cause?

  2. Phone numbers like 0641234567 lose their leading zero in Excel. What should the export do?

  3. A customer named =1+2 shows as 3 in the exported file. What is it?

Why CSV files break in Excel: encoding and the BOM, separators and regional settings, lost leading zeros, long numbers, dates and formula injection.

Part Not started

PDFs and other formats

PDF

PDFs are usually generated on the server from a template. They look fixed, but the data inside changes, and that’s where they break:

  • Letters and fonts: č, ć, đ, ß, Cyrillic, Arabic. Missing characters appear as empty boxes or question marks when the font doesn’t contain them.
  • Long values: a very long company name or address. Does it wrap, or run off the page or over other text?
  • Page breaks: a table with 60 rows. Does it continue on the next page with repeated headers? Is a row split in half? Is the total on the last page?
  • Totals and numbers: the same as on screen, with the right currency and number format for the language.
  • Page size: A4 in Europe, Letter in the US. Print it, or at least open the print preview.
  • Text, not a picture: you can select and search the text, and screen readersScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary → can read it.
  • Meta: the file name and the document title (shown in the browser tab) make sense, such as Invoice-2026-0412.pdf.

XLSX, calendar files and ZIP

Check this part

  1. An invoice PDF shows empty boxes instead of "ć" and "đ". What is the likely cause?

  2. A 60-row table in a PDF continues on page 2. What should page 2 have?

What to check in PDFs (letters, page breaks, totals, page size), XLSX, calendar files and ZIP archives.

Part Not started

The download itself

Big exports run in the background

A list of 200 rows downloads instantly. A year of orders can take minutes, longer than a web request is allowed to run before it hits a timeoutTimeoutThe time limit after which an app stops waiting for a response and gives up.Open in glossary →. Many apps therefore start an export job and send the file later, by email or as a notification (“Your export is ready”).

CheckWhat good looks like
The largest realistic exportIt completes, or the app switches to a background job instead of timing out
FeedbackThe user knows it’s being prepared, and where it will arrive
Clicking Export twiceOne click, one export. No duplicate jobs or two identical emails.
Cancel and leaveClosing the page doesn’t lose a background job
FailureA clear message and a way to retry, not an email with an empty file

The link in “Your export is ready” points to a file full of business or personal data. Test it like any access control (see Security Testing in Depth):

File names

  • Meaningful: orders_2026-11-09.csv, not export.csv, download or orders_undefined.csv.
  • Safe characters: a name taken from user data (“Blue Harbor, d.o.o. / Novi Sad”) must not break the download or create folders. Test spaces, slashes, accented letters and very long names.
  • The right extension, and a file type the OS recognises, so a double-click opens the right app.
Dev note

The browser decides how to handle the response from two headers: Content-Type (for example text/csv; charset=utf-8) and Content-Disposition: attachment; filename="orders_2026-11-09.csv". Without attachment, a PDF or text file may open in the tab instead of downloading. Names with non-English letters need the filename*=UTF-8''… form. You can see both in DevTools › Network.

Phones and in-app browsers

  • iOS: downloads from Safari go to the Files app (Downloads). Apps often use the share sheet instead (“Save to Files”, “Mail”). Check that the file arrives and opens.
  • Android: files go to the Downloads folder and a notification appears. Check opening from the notification.
  • In-app browsers (a link opened inside Instagram, Gmail or your own app’s web view) often can’t download at all. The button must not silently do nothing: offer to open in the browser.
  • Slow and lost connections: a download that fails halfway should show an error, not a broken file that looks complete.

Check this part

  1. You open an export's download link in a private window, not logged in, and the file downloads. When is that a bug?

  2. A user taps Export inside your app's web view, and nothing happens. What should the app do?

Big exports that run in the background, download links and who can open them, file names, and downloading on phones and in in-app browsers.

Part ProNot started

Lab: find the bugs

This is a test build of the QuickBite Partner portal, where restaurants see and export their orders. Export the list, then use the demo’s Open in Excel and Open in a text editor views to look at the file both ways (no software needed). Compare both with the screen. Try the filters too.

The test dataTest dataThe input values, accounts and records you use while testing.Open in glossary → is ready: accented names, a company with a comma, a large catering order, an order placed just after midnight, and a customer who chose a strange name.

🐞 Bug hunt: QuickBite Partner · order export

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
partner.quickbite.test/orders

Orders · Pizza Uno

Newest first · times in Belgrade time

OrderCustomerPlacedTotalStatus
#48206Mila Novak2026-11-09 12:10€12.40refunded
#48205Blue Harbor, d.o.o.2026-11-09 11:05€410.00delivered
#48204Đorđe Šimić2026-11-09 00:30€32.00delivered
#48203=HYPERLINK("http://refund-help.test/x","Refund form")2026-11-08 23:55€18.50refunded
#48202Marko Petrović2026-11-08 22:40€1,240.00delivered
#48201Ana Ćirić2026-11-08 21:15€24.90delivered

Downloads

Nothing downloaded yet. Press Export in the portal.

  1. 1

    Hint: Filter by Refunded, then export. Read the button label and count the rows in the file.

  2. 2

    Hint: Compare Ana Ćirić and Đorđe Šimić in Excel and in the text editor.

  3. 3

    Hint: Look at row 6 in Excel, then at the same line in the text editor.

  4. 4

    Hint: Compare the time of order #48204 on screen and in the file.

  5. 5

    Hint: Look at order #48203 in Excel.

  6. 6

    Hint: Read the name of the downloaded file.

Some things are right, and worth noticing: Blue Harbor, d.o.o. is correctly quoted and stays in one cell, and the rows keep the newest-first order from the screen.

Check this part

  1. Why compare the file in Excel and in a text editor?

  2. The €1,240 order split into two columns. Why is that more than a cosmetic bug?

A restaurant portal's order list with a CSV export, the file opened in Excel and in a text editor, and six bugs to find.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Part ProNot started

Example test cases

What you need: a test account in a test environment where you can create your own records (the known edge data from the first part), Excel on Windows and, if possible, on a Mac, a plain text editor, and a second user account for TC-EXP-008.

TC-EXP-001The export matches the filtered and sorted screen

Preconditions

  • At least 10 orders with different statuses

Steps

  1. Filter by one status and sort by total, descending
  2. Note the number of rows and the first three
  3. Export and open the file

Expected result

Same number of rows, same order, same columns and same values as the screen. The button label matches the row count.

TC-EXP-002Accented letters survive a double-click into Excel

Preconditions

  • Records with names containing č, ć, đ, š, ž (and other alphabets the product supports)

Steps

  1. Export to CSV
  2. Double-click the file to open it in Excel on Windows and on Mac

Expected result

All names display exactly as on screen.

TC-EXP-003Numbers, IDs and phone numbers keep their value

Steps

  1. Export records with the values above
  2. Open in Excel
  3. Sum the Total column

Test data

Phone 0641234567, 18-digit order ID, total 1240.50, total 0.10

Expected result

Leading zeros and all digits of IDs are kept. Totals are numbers in their own column, and the sum equals the sum on screen.

TC-EXP-004Commas, quotes and line breaks stay inside one cell

Steps

  1. Export records with the values above
  2. Open the file in Excel and in a text editor

Test data

Name: Blue Harbor, d.o.o. · Note: She said "ring twice" · Address over two lines

Expected result

Each value stays in its own cell. The text editor shows the values quoted, with inner quotes doubled.

TC-EXP-005Values that look like formulas are not run

Steps

  1. Create a record with the name above
  2. Export and open in Excel

Test data

Customer name: =1+2

Expected result

The cell shows the text =1+2 (possibly with a leading apostrophe), not 3.

TC-EXP-006Times near midnight keep the right date

Preconditions

  • An order placed at 00:30 local time

Steps

  1. Export the day
  2. Compare the date and time with the screen

Expected result

The same date and time as the screen, or a column header that states the time zone.

TC-EXP-007A large export completes or runs in the background

Preconditions

  • The largest realistic data set, such as one year of orders

Steps

  1. Export everything
  2. Click the Export button a second time right away
  3. Wait for the file or email

Expected result

One file (or one email) with all rows. No timeout error, no duplicate job.

TC-EXP-008Download links are protected and expire

Steps

  1. Export and copy the download link
  2. Open it logged out, then as another user
  3. Open it after the agreed expiry time

Expected result

Login required or access denied for others. After expiry, a clear message with a way to export again.

Tip: click a test case to expand it.

Check this part

  1. In the formula test case, what should the cell show for the name =1+2?

  2. In the large export test case, what happens if the user clicks Export twice?

Ready-made test cases for scope and filters, encoding, numbers and IDs, quoting, formula injection, time zones, PDFs, big exports and download links.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Checklist

File export and download

0 of 14 checked

Key takeaways

  • The core check: the file matches what the user asked for: scope, filters, columns, order and values.
  • Prepare known edge data before exporting: accented names, commas, large amounts, leading zeros, times near midnight.
  • Open CSV files by double-click in Excel and in a text editor. Excel guesses encoding, separator and types.
  • Watch for garbled letters, one-column files, lost zeros, 1.23E+17, shifted amounts and formulas in exported values.
  • PDFs break on letters, long values, page breaks and totals. Print preview them.
  • Big exports need a background job, one job per click, and a clear failure path.
  • Download links are access control: logged out, another user, changed ID, expired.
  • Check file names, and downloading on iOS, Android and in-app browsers.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.