Excel file error on export

After metabase upgrade 0.41 to 0.46 all my excel exporting files are always in error and can't be opened in excel.
We have an error message like this one :

A notepad shows symbols within the generated files.

No stacktrace generated when the doc is generated and it works with csv or json export.
Diagnostic :
{
"browser-info": {
"language": "fr",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.18+10-post-Ubuntu-0ubuntu122.04",
"java.vendor": "Ubuntu",
"java.vendor.url": "https://ubuntu.com/",
"java.version": "11.0.18",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.18+10-post-Ubuntu-0ubuntu122.04",
"os.name": "Linux",
"os.version": "5.15.0-69-generic",
"user.language": "fr",
"user.timezone": "Africa/Nairobi"
},
"metabase-info": {
"databases": [
"h2",
"mysql",
"sqlserver",
"oracle",
"csv",
"postgres"
],
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MariaDB",
"version": "10.6.12-MariaDB-0ubuntu0.22.04.1"
},
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.7.6"
}
},
"run-mode": "prod",
"version": {
"date": "2023-03-28",
"tag": "v0.46.0",
"branch": "release-x.46.x",
"hash": "0ca7df3"
},
"settings": {
"report-timezone": null
}
}
}
Can you please provide me some assistance ?
Thnx

I need you to force open the file with excel and show the data which is there (there’s an error inside the file). If you cannot do that, please post the logs when doing the export

Hello,
The 2nd image on the 1st post is the result when force opening the file. And no message on the log when exporting is made like there is no error.

Try downloading it as JSON and open the file to see the error

Hello,
The Json file is working as excepted without errors and it's the same with the csv export.
Only xlsx export isn't working.

there is no way you can open the file with excel? we need to see what's inside the excel itself as Metabase writes the actual error there. Another way would be that you post the logs when you do the export so we can see what's in there

Hello,
The result When i open the xlsx file with a notepad is shown in the 1st post on the 2nd image. I tried to launch the metabase jar file with a java option -Djava.awt.headless=false, i have a generated file when xlsx exported with json content
{"via":[{"type":"java.awt.AWTError","message":"Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.","at":["sun.awt.X11GraphicsEnvironment","initDisplay","X11GraphicsEnvironment.java",-2]}],"trace":[["sun.awt.X11GraphicsEnvironment","initDisplay","X11GraphicsEnvironment.java",-2],["sun.awt.X11GraphicsEnvironment$1","run","X11GraphicsEnvironment.java",102],["java.security.AccessController","doPrivileged","AccessController.java",-2],["sun.awt.X11GraphicsEnvironment","","X11GraphicsEnvironment.java",61],["java.lang.Class","forName0","Class.java",-2],["java.lang.Class","forName","Class.java",315],["java.awt.GraphicsEnvironment$LocalGE","createGE","GraphicsEnvironment.java",101],["java.awt.GraphicsEnvironment$LocalGE","","GraphicsEnvironment.java",83],["java.awt.GraphicsEnvironment","getLocalGraphicsEnvironment","GraphicsEnvironment.java",129],["sun.awt.X11FontManager","isHeadless","X11FontManager.java",464],["sun.awt.X11FontManager","getFontPath","X11FontManager.java",732],["sun.font.SunFontManager","getPlatformFontPath","SunFontManager.java",3196],["sun.font.SunFontManager$10","run","SunFontManager.java",3218],["java.security.AccessController","doPrivileged","AccessController.java",-2],["sun.font.SunFontManager","loadFonts","SunFontManager.java",3214],["sun.awt.X11FontManager","loadFonts","X11FontManager.java",438],["sun.font.SunFontManager","findFont2D","SunFontManager.java",2231],["java.awt.Font","getFont2D","Font.java",506],["java.awt.Font","canDisplayUpTo","Font.java",2250],["java.awt.font.TextLayout","singleFont","TextLayout.java",469],["java.awt.font.TextLayout","","TextLayout.java",530],["org.apache.poi.ss.util.SheetUtil","getDefaultCharWidth","SheetUtil.java",301],["org.apache.poi.xssf.streaming.AutoSizeColumnTracker","","AutoSizeColumnTracker.java",117],["org.apache.poi.xssf.streaming.SXSSFSheet","","SXSSFSheet.java",95],["org.apache.poi.xssf.streaming.SXSSFWorkbook","createAndRegisterSXSSFSheet","SXSSFWorkbook.java",726],["org.apache.poi.xssf.streaming.SXSSFWorkbook","createSheet","SXSSFWorkbook.java",745],["org.apache.poi.xssf.streaming.SXSSFWorkbook","createSheet","SXSSFWorkbook.java",102],["dk.ative.docjure.spreadsheet$add_sheet_BANG_","invokeStatic","spreadsheet.clj",351],["dk.ative.docjure.spreadsheet$add_sheet_BANG_","invoke","spreadsheet.clj",347],["metabase.query_processor.streaming.xlsx$fn__54155","invokeStatic","xlsx.clj",496],["metabase.query_processor.streaming.xlsx$fn__54155","invoke","xlsx.clj",493],["clojure.lang.MultiFn","invoke","MultiFn.java",234],["metabase.query_processor.streaming$streaming_context","invokeStatic","streaming.clj",145],["metabase.query_processor.streaming$streaming_context","invoke","streaming.clj",138],["metabase.query_processor.streaming$streaming_context","invokeStatic","streaming.clj",151],["metabase.query_processor.streaming$streaming_context","invoke","streaming.clj",138],["metabase.query_processor.streaming$streaming_response_STAR_$fn__54305$fn__54306","invoke","streaming.clj",166],["metabase.query_processor.streaming$streaming_response_STAR_$fn__54305","invoke","streaming.clj",165],["clojure.lang.AFn","applyToHelper","AFn.java",156],["clojure.lang.AFn","applyTo","AFn.java",144],["clojure.core$apply","invokeStatic","core.clj",667],["clojure.core$with_bindings_STAR_","invokeStatic","core.clj",1990],["clojure.core$with_bindings_STAR_","doInvoke","core.clj",1990],["clojure.lang.RestFn","applyTo","RestFn.java",142],["clojure.core$apply","invokeStatic","core.clj",671],["clojure.core$bound_fn_STAR_$fn__5818","doInvoke","core.clj",2020],["clojure.lang.RestFn","invoke","RestFn.java",421],["metabase.async.streaming_response$do_f_STAR_","invokeStatic","streaming_response.clj",69],["metabase.async.streaming_response$do_f_STAR_","invoke","streaming_response.clj",67],["metabase.async.streaming_response$do_f_async$task__36922","invoke","streaming_response.clj",88],["clojure.lang.AFn","run","AFn.java",22],["java.util.concurrent.Executors$RunnableAdapter","call","Executors.java",515],["java.util.concurrent.FutureTask","run","FutureTask.java",264],["java.util.concurrent.ThreadPoolExecutor","runWorker","ThreadPoolExecutor.java",1128],["java.util.concurrent.ThreadPoolExecutor$Worker","run","ThreadPoolExecutor.java",628],["java.lang.Thread","run","Thread.java",829]],"cause":"Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.","_status":500}

Does it mean that my java installation is not correct ?

Please launch Metabase without any Java options

Without any java options i don't have any error message on the excel file downloaded just the symbols.
Here is the log generated:

[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:05+03:00 INFO metabase.query-processor.middleware.cache L'exécution de la requête a pris 3,6 s ; le minimum pour l'éligibilité du cache est 30,0 s.
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:06+03:00 DEBUG metabase.server.middleware.log GET /api/collection/169 200 13,0 ms (4 appels de DB) Connexions App DB : 0/15 Threads Jetty : 7/50 (2 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 2 (0 en file d'attente)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:06+03:00 DEBUG metabase.server.middleware.log GET /api/collection/169/items 200 50,4 ms (5 appels de DB) Connexions App DB : 0/15 Threads Jetty : 8/50 (1 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 2 (0 en file d'attente)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:06+03:00 DEBUG metabase.server.middleware.log POST /api/card/448/query/xlsx 202 [ASYNC: completed] 4,7 s (15 appels de DB) Connexions App DB : 0/15 Threads Jetty : 7/50 (1 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 1 (0 en file d'attente); postgres DB 72 connections: 0/1 (0 threads blocked)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:06+03:00 DEBUG metabase.server.middleware.log GET /api/collection/169/items 200 526,8 ms (5 appels de DB) Connexions App DB : 1/15 Threads Jetty : 7/50 (1 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 1 (0 en file d'attente)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:08+03:00 DEBUG metabase.server.middleware.log POST /api/card/pivot/706/query 202 [ASYNC: completed] 8,0 s (88 appels de DB) Connexions App DB : 1/15 Threads Jetty : 4/50 (4 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente); sqlserver DB 81 connections: 0/1 (0 threads blocked)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:23+03:00 DEBUG metabase.server.middleware.log GET /api/card/736 200 46,1 ms (11 appels de DB) Connexions App DB : 0/15 Threads Jetty : 6/50 (3 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:23+03:00 DEBUG metabase.server.middleware.log GET /api/card/736 200 44,1 ms (11 appels de DB) Connexions App DB : 1/15 Threads Jetty : 6/50 (3 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente)
[acec0e37-8db9-4895-84af-b8fa5a009fd8] 2023-04-05T15:43:23+03:00 DEBUG metabase.server.middleware.log GET /api/alert/question/736 200 1,4 ms (1 appels de DB) Connexions App DB : 1/15 Threads Jetty : 6/50 (3 inactif, 0 en file d'attente) (184 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente)

we'll need either the excel file, and/or a DDL with fake data to try to understand what's going on, we can't reproduce on our end

Hello,
here is a link for an xlsx file generated by metabase, can you please explain how i can provide a "DDL with faka data" ?

thx

Hello,
The situation is now ok After making all java plugins update. Really dont Knox whats related with the xlsx export.
Thx