KNOWLEDGE BASE

Error "hyper_execute_query: 0 'case' requires the string literals in the WHEN clauses to be interpretable as the type of the expression after 'case'" When Connecting Excel


Published: 29 Sep 2021
Last Modified Date: 30 Sep 2021

Issue

When connecting to an Excel file or refreshing a live connection with Excel, an error occurs:
 
"hyper_execute_query: 0 'case' requires the string literals in the WHEN clauses to be interpretable as the type of the expression after 'case'"

Environment

  • Tableau Desktop 2020.2 or higher
  • Windows 10
  • Excel

Resolution

Disable macros in the .xlsm file or copy the data only from the .xlsm file into a new .xlsx file, then connect to the file with Tableau Desktop.

Cause

The Excel file is in .xlsm format and contains macros interfering with Tableau Desktop. 

An XLSM file is a macro-enabled spreadsheet created by Microsoft Excel.
Did this article resolve the issue?