How to import the data from a password protected XLSX file in MATLAB?
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Nov. de 2017
Editada: MathWorks Support Team
el 13 de Abr. de 2023
How to import the data from a password protected XLSX file in MATLAB?
I have to import data from a password protected XLSX file. How can I do that in MATLAB?
Respuesta aceptada
MathWorks Support Team
el 13 de Abr. de 2023
Editada: MathWorks Support Team
el 13 de Abr. de 2023
To import the data from the password protected XLSX file you can use any of the following possible solutions:
1. You can import the data into MATLAB interactively, using the Import Tool. Please refer to the following link for more information on using the Import Tool:
Here, once you select the XLSX file to import the data, you need to enter the password for the file in the Password window that comes up.
2. You can create a table from the file using the "readtable" function. Here, after executing the following command in the Command Window, you need to enter the password for the file (specified in the filename) in the Password window that comes up:
>> T = readtable(filename);
Starting with R2018b, you will need to manually direct MATLAB to use Excel to open the file:
>> T = readtable(filename, 'UseExcel', true);
Please refer to the following documentation for more information on using the "readtable" function:
3. You can access the spreadsheet data from MATLAB by running the Excel application in an Automation server process using the "actxserver" function. Please refer to the attached example script, "passwordProtectedRead.m" that demonstrates reading the data from a password protected XLSX file, "passwordExample.xlsx", using the "actxserver" function. Also, please refer to the following link for more information on reading spreadsheet data using Excel as Automation server:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!