필터 지우기
필터 지우기

How can I programmatically modify an Excel file with AIP sensitivity tags?

조회 수: 22 (최근 30일)
Ricardo Corrales Barquero
Ricardo Corrales Barquero 2024년 5월 21일
답변: Poorna 2024년 6월 3일
My company has recently decided to make Excel create files automatically with Azure Information Protection (AIP) sensitivity labels. We have programs in MATLAB that modify Excel files, but because of this, they have started to fail when trying to modify the files. Specifically, when using the writetable function, MATLAB shows the following error:
Unable to write to file 'D:\Prueba xlswrite\Benchmark_Colones_1-2años_31-03-2024.xlsx'.
Ensure the file is a valid spreadsheet file and is not password protected.
Is there a way to programmatically provide the credentials needed by Excel to be able to modify the file when it is allowed?

답변 (1개)

Poorna
Poorna 2024년 6월 3일
Hi Ricardo,
I see you are facing errors while modifying excel files that have AIP labels using the "writetable" function.
I suggest you to use COM server functionality provided by MATLAB to make modifications to files for this requirement. You can use the "actxserver" function to create a COM server and use it to read and modify your excel files. These functions provide you much more customizations and settings while reading and writing to Microsoft documents.
Refer to the following documentation to learn more about "actxserver":
Refer to the following documentation demonstrating, reading and writing to excel files using the server:
Refer to the following MATLAB answer that has example code to modify the AIP tags as well:
Hope this Helps!

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by