Borrar filtros
Borrar filtros

unable read any ".xlsx" or ".xls" data

8 visualizaciones (últimos 30 días)
Yu Jui Huang
Yu Jui Huang el 17 de Nov. de 2020
Respondida: Sukrut Tamhankar el 20 de Nov. de 2020
它無法讀取任何“ .xlsx”或“ .xls”數據。它甚至沒有報告命令窗口中的任何錯誤,而是當我雙擊其中任何一個時發出的簡單聲音。我使用win10,MATLAB2020b,office 2013。
我已經從MATLAB獲得了所有工具箱。並且Excel可以正常工作。這些“ .xlsx / .xls”可以“在matlab外部打開”,並且在以下情況下可以使用:
readtable('path_to.xlsx','Sheet','sheet_name')
如果我不僅要在命令窗口中打開表,而且要直接在MATLAB中打開“ .xlsx / .xls”,該如何解決?
  10 comentarios
Yu Jui Huang
Yu Jui Huang el 18 de Nov. de 2020
It is OK with ".csv".
I need to import "xls/xlsx" like that but it can't. It is unable to read (or import) like the form of excel in MATLAB, without any message of error.
Rik
Rik el 18 de Nov. de 2020
From your screenshot it looks like xlsread works normally.
You should not confuse the import tool with actually editing the file.
Have you done a Matlab tutorial? You may consider doing the Onramp tutorial (which is provided for free by Mathworks). It should teach you the basics. I'm not sure if there is an excersize with loading and writing excel files, but there might be.

Iniciar sesión para comentar.

Respuestas (1)

Sukrut Tamhankar
Sukrut Tamhankar el 20 de Nov. de 2020
As per my understanding, you are expecting to edit excel file from the MATLAB directly. Please refer the following example which shows how to use a COM Automation server to access another application from MATLAB. It creates a user interface to access the data in a Microsoft Excel file:
This technique can help you to edit data in the excel file and save it back to the file through MATLAB.
You can find the answer to the similar query in the following MATLAB Answer link in which the same technique is used :
Whereas, Import tool or import functions enable you to read the data from excel file in the MATLAB.

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by