How can I Install POI library on Mac?

조회 수: 23 (최근 30일)
NooshinY
NooshinY 2018년 2월 2일
댓글: Butterflyfish 2018년 9월 1일
I want to use XLSwrite on macbook. So I need to install POI library. How can I install it?

답변 (3개)

Walter Roberson
Walter Roberson 2018년 2월 2일
Be careful with changing JAVA_HOME, as MATLAB pays attention to it. Also to make the change permanent you would have to put the command into your ~/.bash_profile
Where the tutorial talks about changing CLASSPATH you should look at https://www.mathworks.com/help/matlab/matlab_external/java-class-path.html
  댓글 수: 2
Butterflyfish
Butterflyfish 2018년 8월 24일
Unfortunately tutorial is for Windows or Linux based systems. Any advice to do it on OSX?
Walter Roberson
Walter Roberson 2018년 8월 24일
You can use /usr/libexec/java_home to find the value you should use for JAVA_HOME .

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


Butterflyfish
Butterflyfish 2018년 8월 24일
In your Matlab code, add:
addpath('/dir/20130227_xlwrite/poi_library')
javaaddpath('poi_library/poi-3.8-20120326.jar');
javaaddpath('poi_library/poi-ooxml-3.8-20120326.jar');
javaaddpath('poi_library/poi-ooxml-schemas-3.8-20120326.jar');
javaaddpath('poi_library/xmlbeans-2.3.0.jar');
javaaddpath('poi_library/dom4j-1.6.1.jar');
javaaddpath('poi_library/stax-api-1.0.1.jar');

Samar Guharay
Samar Guharay 2018년 9월 1일
Since I have a MAC, I am trying to use xlwrite instead of the standard xlswrite. I am getting the following comments. Any suggestions to solve this problem?
"The POI library is not loaded in Matlab. Check that POI jar files are in Matlab Java path!"
  댓글 수: 1
Butterflyfish
Butterflyfish 2018년 9월 1일
Have you tried to add the code above in your script?

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

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by