필터 지우기
필터 지우기

How to open a specific EXCEL sheet with the function _fopen_?

조회 수: 63 (최근 30일)
GANTY
GANTY 2013년 8월 28일
Hi everyone,
I would like to use the function fopen to open a xlsx file using:
fid=fopen('filename.xlsx')
Is it possible to specify the excel sheet I would like to open since my file has several sheets (and since the first sheet has a special xls "table style")?
Thanks a lot for your help!

답변 (2개)

Iain
Iain 2013년 8월 28일
fopen opens files for binary or string access.
An excel file is a binary file in a format that is not easily defined, so reading it with fopen and the various reading commands is on to a loser.
The function "xlsread", with the right inputs will open the file and give you out the contents of the sheet you actually care about.

Pramit Biswas
Pramit Biswas 2013년 8월 28일
  댓글 수: 1
GANTY
GANTY 2013년 8월 29일
Thank you very much for your help Pamit Biswas and lain!

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by