How to Open DWG and DWF Hyperlinks from Excel or PDF
Question details
The user needs to open linked DWG and DWF drawing files directly in their associated CAD viewer from an Excel document saved as HTML or PDF, avoiding automatic file downloads.

- Product
- Excel, PDF Viewers
- Device & OS
- not provided
- Scenario
- Clicking DWG or DWF file hyperlinks embedded in an Excel sheet that has been exported to PDF or HTML.
- Observed behavior
- Links may download the CAD files instead of opening them directly due to built-in security settings in HTML browsers and PDF viewers.
Ensure you have a compatible CAD viewer installed (such as AutoCAD or DWG TrueView) and set as the default system application for .dwg and .dwf file types.
Export to PDF and Configure Default OS Applications
Save the Excel workbook as a PDF to preserve the hyperlinks, and configure your operating system to open the CAD files directly.
HTML and PDF viewers often download DWG and DWF files by default for security reasons to prevent malicious code execution. To bypass this and open files directly, you must rely on the operating system's default file association settings combined with an exported PDF.
Open your Excel document containing the DWG or DWF hyperlinks. Go to 'File' > 'Save As' and select 'PDF' as the file format. This ensures the hyperlinks are properly embedded in the output file.
Open the system settings on your computer and navigate to 'Default Apps' (or 'Default Programs' depending on your OS). Associate the .dwg and .dwf file extensions with your preferred CAD application.
Open the exported PDF document using a dedicated PDF viewer (like WPS PDF or Adobe Acrobat) rather than a web browser, and click the hyperlink to test if it opens directly in the CAD viewer.

Preserve Hyperlinks by Exporting to PDF with WPS Office
Use WPS Spreadsheet to easily manage your data and export your workbooks to PDF while keeping all DWG and DWF hyperlinks fully clickable and intact.
- 1. Open your Spreadsheet: Launch WPS Office and open your .xlsx file containing the CAD links.
- 2. Verify Links: Right-click the hyperlinked cells and select 'Edit Hyperlink' to ensure the file paths point correctly to your local DWG or DWF files.
- 3. Export to PDF: Click the 'Menu' button, select 'Export to PDF', and ensure the option to convert hyperlinks is checked before saving your document.

Frequently Asked Questions
Why do my DWG links download instead of opening automatically?
Modern web browsers and PDF viewers restrict the automatic execution of external files like DWG or DWF for security reasons. They force a download to prevent potentially malicious scripts from running without your explicit consent.
Can I view DWG files directly inside my spreadsheet?
Spreadsheet software does not have a native CAD viewer. You can embed CAD files as OLE objects if you have AutoCAD installed, but using hyperlinks to open them in an external viewer is generally much more reliable.
How do I fix broken hyperlinks when converting Excel to PDF?
Ensure you are using the 'Save As PDF' or the built-in 'Export to PDF' function. If you use 'Print to PDF', the virtual printer will flatten the document and remove all clickable hyperlinks.




