How to make mlx export to use word's default template?

조회 수: 9 (최근 30일)
Sasha Brodski
Sasha Brodski 2024년 11월 3일
답변: Sasha Brodski 2025년 2월 3일
When I use 'export' on a Live Script mlx file to docx, the output is created without the word template.
However, when use 'publish' on an m file, the output doc file uses the default word template.
How can I make mlx's 'export' function use the default word's template?

답변 (2개)

Abhishek Kumar Singh
Abhishek Kumar Singh 2024년 11월 4일
By default, the export function for MLX files converts them into PDF format. To export an MLX file to a DOCX format, you need to specify the 'Format' name-value argument. Additionally, you can customize options such as page size.
Here's an example of how to use the export function:
>> export("yourMLXfile.mlx", Format="docx", PageSize="Letter", OpenExportedFile=true)
Please refer to the documentation section here: https://www.mathworks.com/help/matlab/ref/export.html#namevaluepairs
I hope this helps.
  댓글 수: 1
Sasha Brodski
Sasha Brodski 2024년 11월 6일
Hi Abhishek, thanks for the answer but that wasn't where I had trouble. I was able to export to a .docx file (and other types as as well), but as I wrote in my original quention the issue I had that my original .docx template (i.e. my custom heading and footing which I defined in Word) is being overwritten when using Live Script's 'export' feature.

댓글을 달려면 로그인하십시오.


Sasha Brodski
Sasha Brodski 2025년 2월 3일
up

카테고리

Help CenterFile Exchange에서 Adding custom doc에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by