Export epoched brainstrom data to spm format

Hi everyone,

i wanted to export trials from brainstorm into spm, so that the .dat file has the dimensions (n-Channels, t-Timepoints, m-Trials).
However, clicking in Brainstorm on File -> Export to File and select teh SPM format (.mat/.dat) i get the following error:

Error using export_data
Error using out_fopen_spm
MEG sensors are currently not supported by this function.
Please contact us through the Brainstorm user forum to request this feature.

Error in export_data (line 58)
        [AllOutputs{1}, sFileOut1] = export_data(DataFile{1}, ChannelMat, ExportFile);

Error in tree_callbacks>@(h,ev)export_data(GetAllFilenames(bstNodes,'data')) (line 1750)
                    jMenuExport = gui_component('MenuItem', [], [], 'Export to file', IconLoader.ICON_SAVE, [], @(h,ev)export_data(GetAllFilenames(bstNodes, 'data')));

I saw this post and wanted to check with you, if you have a way of doing that?

Thanks in advance!
Best, Jan

Exporting sensor data to SPM is limited to EEG and one trial, each trial leads to one .mat/.dat file pair.

As in the shared link, Brainstorm trial files are plain Matlab .mat files that could be easily manipulated to obtain the desired format [nChannels, nTime, nTrial]