Ηow to convert Excels sheet from XML file after MT5 optimization Mac Wine

I'm on Mac Wine, after optimization in MT5, its allowing to export only in XML format but not downloading report in Excel sheet?

In MetaTrader 5, the Optimization Results export generates an Excel SpreadsheetML .xml file rather than a native .xlsx workbook, and under Mac Wine there is no native Windows Excel COM layer to launch Excel automatically.

Two quick ways to open those results immediately on macOS:

1. Right-click inside the Optimization Results tab, choose Copy All, and paste straight into Microsoft Excel for Mac, LibreOffice Calc, or Apple Numbers.

2. Save the .xml file into a folder shared with macOS (or locate it under your Wine prefix's MQL5\Files\ path), then open it via File -> Open from inside Excel for Mac or LibreOffice Calc (do not just double-click it in Finder).

If you own the EA source and want MT5 to generate a clean .csv file automatically in MQL5\Files\opt_results.csv after every optimization without relying on XML or Wine, collect the passes with FrameAdd() and write the CSV in OnTesterDeinit():

double OnTester() {
   double s[2]; s[0] = TesterStatistics(STAT_PROFIT); s[1] = TesterStatistics(STAT_PROFIT_FACTOR);
   FrameAdd("OptStats", 1, s[0], s); return s[0]; }
void OnTesterDeinit() {
   int h = FileOpen("opt_results.csv", FILE_WRITE|FILE_CSV|FILE_ANSI, ",");
   if(h == INVALID_HANDLE) return;
   ulong pass = 0; string name = ""; long id = 0; double val = 0.0, d[];
   for(FrameFirst(); FrameNext(pass, name, id, val, d); )
      if(ArraySize(d) >= 2) FileWrite(h, pass, d[0], d[1]);
   FileClose(h); }

That writes one row per completed pass on the local terminal after all testing agents finish, avoiding file-lock collisions during multi-core runs.

Margarita Florencia Del Aguila #:

In MetaTrader 5, the Optimization Results export generates an Excel SpreadsheetML .xml file rather than a native .xlsx workbook, and under Mac Wine there is no native Windows Excel COM layer to launch Excel automatically.

Two quick ways to open those results immediately on macOS:

1. Right-click inside the Optimization Results tab, choose Copy All, and paste straight into Microsoft Excel for Mac, LibreOffice Calc, or Apple Numbers.

2. Save the .xml file into a folder shared with macOS (or locate it under your Wine prefix's MQL5\Files\ path), then open it via File -> Open from inside Excel for Mac or LibreOffice Calc (do not just double-click it in Finder).

If you own the EA source and want MT5 to generate a clean .csv file automatically in MQL5\Files\opt_results.csv after every optimization without relying on XML or Wine, collect the passes with FrameAdd() and write the CSV in OnTesterDeinit():

That writes one row per completed pass on the local terminal after all testing agents finish, avoiding file-lock collisions during multi-core runs.

my MACWINE dont show "Copy All" option even on right click.........
gvr321 #:
my MACWINE dont show "Copy All" option even on right click.........
You can prompt the MT5-integrated AI Assistant to write an MQL5 Service that copies your backtest report data and writes to whatever format you like for Excel. I actually did that to create one in Windows that copies the raw data as the Tester runs and generates a unique custom report. As it's all done inside MT5, it should also work in MACWine. If you install your spreadsheet application in your MT5 Data Folder, the AI Assistant can directly access it for purposes of development/troubleshooting/read testing.