Effacer les filtres
Effacer les filtres

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

22 vues (au cours des 30 derniers jours)
Ricardo Corrales Barquero
Ricardo Corrales Barquero le 21 Mai 2024
Réponse apportée : Poorna le 3 Juin 2024
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?

Réponses (1)

Poorna
Poorna le 3 Juin 2024
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!

Catégories

En savoir plus sur Use COM Objects in MATLAB dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by