windows - xlsopen 在 Windows 10 Octave 4.0.3 中不起作用

标签 windows octave

我只想运行简单的代码

f = xlsopen('Libro1.xlsx');

我在 Windows 10 中使用 Octave 4.0.3,Java 版本 8 更新 111 1.8.0_111-b14

目前我了解到的有:
已经卸载了,重新安装,
确保路径中没有非 ASCII 字符,
安装了最新的 Java 版本(这并不重要?据说 Octave Windows 安装程序会为您安装一个版本)
加载了 windows 和 io pkgs
io 版本 2.4.3 和 windows 版本 1.2.4
并且仍然收到此错误:

warning: fopen: 'C:/Users/tommy/Documents/Octave\Libro1.xlsx' found by searching load path warning: called from xlsopen at line 241 column 7 xlsread at line 197 column 11 prueba4 at line 2 column 3 Detected XLS interfaces: COM*; warning: No Java support found (no Java JRE? no Java pkg installed AND loaded?)

warning: ActiveX error trying to open or create file C:\Users\tommy\Libro1.xlsx warning: COM_spsh_open: some elements in list of return values are undefined file Libro1.xlsx couldn't be unpacked. Is it the proper file format? warning: OCT_spsh_open: some elements in list of return values are undefined None. warning: xlsopen.m: no'.xlsx' spreadsheet I/O support with available interfaces. warning: xlsread: some elements in list of return values are undefined d =

看到过各种线程,甚至有一个具有完全相同的消息,但是安装 java 解决了它,或者找到了另一个解决方案但没有在线程上报告。

最佳答案

首先:我只在您的帖子中看到警告(没有错误)探测几个接口(interface),我猜 xlsopen 自动使用 OCT 接口(interface)并且 f 之后有效。有几个接口(interface)可以使用 io 包读取 xlsx。参见 here .我建议使用没有依赖关系的 OCT 接口(interface)。如果你真的想要一个基于 java 的界面,你必须安装 JRE 或 JDK,安装一个支持 java 的 Octave。

编辑:现在我看到您的文件 Libro1.xlsx 不在您的工作目录中,看起来您已经使用 addpath 添加了您的 Libro1.xlsx 所在的文件夹“警告:fopen:'C:/Users/tommy/Documents/Octave\Libro1.xlsx' 通过搜索加载路径找到”。

但是“addpath”不被认为是为 fopen 添加目录。 cd 到您的 Libro1.xlsx 所在的目录(以便您在执行 ls 时看到它列出)或使用 fullfile 创建一个完整的文件名> 并在 xlsopen

中使用它

关于windows - xlsopen 在 Windows 10 Octave 4.0.3 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40165423/

相关文章:

python - 我应该抛出哪个 Python 异常?

php - 在 PHP、Window Dos 中启用 Debug模式

matlab - AI 神经网络错误的手写数字预测由于反色。 Octave /Matlab?

machine-learning - 梯度下降和正态方程为多元线性回归提供不同的 theta 值。为什么?

c# - 如何将 Octave 实现导入 C++ 或 C#

android - 如何读取 SD 卡 ID 号?

c++ - 如何使用 C++ 观看 winapi dll 函数调用

c++ - IsWindows10OrGreater() 在 Windows 10 上失败

matlab - 根据数组的长度创建数字模式

python - 在 python 中执行 oct2py 以运行 Octave 脚本时发生哨兵错误