logo
search
VBA & Macro Problems

How to Fix Strikethrough Text in Excel PDFs Exported via VBA

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

The user needs to resolve an issue where Excel workbooks exported to PDF via VBA display unexpected strikethrough formatting on text, despite the original cells not being formatted that way.

Product
Excel
Device & OS
not provided
Scenario
Exporting Excel workbooks to PDF format using VBA commands such as ExportAsFixedFormat or PrintOut.
Observed behavior
Unexpected strikethrough text appears in the generated PDF files. This anomaly began occurring after a recent Excel update.
Before you start

Ensure you have access to your workbook's calculation options, as this issue is closely tied to the manual calculation mode in recent Excel versions.

Solution 1Recommended

Disable 'Format Stale Values' or Force Workbook Recalculation

Turn off the Format Stale Values option or recalculate the workbook prior to exporting. This resolves the phantom strikethrough formatting caused by the manual calculation mode.

When Excel's calculation mode is set to Manual, a new feature called 'Format Stale Values' may apply strikethrough formatting to indicate cells that have not been recalculated. This visual cue can unintentionally carry over to PDFs when exporting via VBA.

1
Force Recalculation

Navigate to the 'Formulas' tab on the ribbon and click on 'Calculate Now', or simply press F9 on your keyboard to force a full recalculation before running your VBA export script.

2
Access Excel Options

If you prefer to keep calculation set to Manual without the strikethrough effect, click on 'File' in the top-left corner and select 'Options'.

3
Navigate to Advanced Settings

In the Excel Options dialog box, select the 'Advanced' tab on the left-hand side.

4
Disable Format Stale Values

Scroll down to the 'When calculating this workbook' section. Uncheck the box labeled 'Format Stale Values' and click 'OK'.

5
Run VBA Export

Execute your VBA macro (ExportAsFixedFormat or PrintOut) again. The exported PDF should now generate without the unexpected strikethrough text.

Verified Fix: Disabling the 'Format Stale Values' setting has been confirmed to resolve this specific PDF formatting bug introduced in recent Excel updates.
Free Microsoft Office alternative

Experience Flawless VBA and PDF Exporting with WPS Office

Tired of unexpected formatting issues in Microsoft Excel after updates? WPS Office provides a lightweight, highly compatible alternative with robust VBA support and built-in, flawless PDF export tools. Enjoy a familiar interface and seamless migration without the hassle of stale value bugs.

  1. 1. Download and Install: Download WPS Office for free from the official website and follow the simple installation instructions.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsm or .xlsx files without worrying about compatibility loss.
  3. 3. Run Macros and Export: Execute your existing VBA macros and use the reliable built-in PDF export feature for perfectly formatted documents.
Highly compatible with Microsoft Excel file formats (.xlsx, .xlsm, .xls)Robust VBA and macro support for automating your spreadsheet workflowsBuilt-in, precise PDF exporting without unexpected formatting glitchesFree and lightweight alternative to Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel PDF export have strikethrough text?

This occurs due to Excel's 'Format Stale Values' feature. When your workbook is set to Manual calculation, Excel places a strikethrough on cells that need recalculating. This visual indicator accidentally carries over to PDFs when exporting via VBA.

How do I fix formatting issues in VBA ExportAsFixedFormat?

If you are seeing unexpected formatting like strikethroughs, ensure your workbook is fully recalculated by pressing F9 before running the VBA script, or disable the 'Format Stale Values' option in Excel's Advanced options.

Does manual calculation affect VBA macros?

Yes, running macros while calculation is set to manual can leave cells with outdated values. In recent Excel versions, this triggers visual features like 'Format Stale Values', which alters the cell appearance and can negatively impact files exported via macros.

Can I share my workbook with Microsoft to investigate a bug without revealing private data?

Yes, if requested by Microsoft support to investigate an issue like this, you should create a simplified version of your spreadsheet by removing all confidential information, then upload it through a secure private message channel provided by the agent.