0

How to stop in Excel automatic conversion from text to hyper links with formatting style?

I know that this feature is good in most cases, but I work on report creation and I have problem with long domain names when I want to print document.

UPD: This is for automatically generated reports from XML data source into Excel and then PDF.

Excel 2003 format is most simple to do it with XSL(T)

Eir Nym
  • 377

3 Answers3

2

Excel 2003

Go to Menu Tools > Autocorrect Options. Select the AutoFormat As You Type tab. Uncheck the box for adding hyperlinks. This will stop Excel from putting the hyperlinks in the first place. Find more information here.

Excel 2007/2010

Click the Microsoft Office Button, and then click Excel Options.

The Excel Options button is located in the lower part of the menu that opens after you click the Microsoft Office Button . Click Proofing. Click AutoCorrect Options. Click the AutoFormat As You Type tab. Select or clear the check boxes for the options that you want to enable or disable.

With VBA

Solution with VBA Event on Worksheet_Change (Excel 2000 but can be adapted to any higher version)

slhck
  • 235,242
JMax
  • 3,205
1

In Excel-VBA:

Application.AutoFormatAsYouTypeReplaceHyperlinks = False

You could put this in the Workbook_Open event so that this happens automatically when the user opens the workbook.

Private Sub Workbook_Open()
    Application.AutoFormatAsYouTypeReplaceHyperlinks = False
End Sub
0

I've found official documentation about Excel XML format. There's attribute x:Ticked="1" for ss:Data which prevents cell automatic format.

Eir Nym
  • 377