代码之家  ›  专栏  ›  技术社区  ›  Syed Saad

将.ods表加载到倍频程时出错

  •  1
  • Syed Saad  · 技术社区  · 6 年前

    我正在尝试使用代码将电子表格中的一列整数读入倍频程

    A = odsread('Data.ods', 'Sheet1', 'A1:A946');
    

    但它失败了,我收到一条带有警告和错误的消息:

    > unzip:  cannot find or open Data.ods, Data.ods.zip or Data.ods.ZIP.
    file Data.ods couldn't be unpacked. Is it the proper file format?
    warning: UnZip failed with error 9
    Output:
    error: warning: STATE structure must have fields 'identifier' and 'state'
    error: called from
        __OCT_spsh_open__ at line 72 column 7
        odsopen at line 267 column 30
        odsread at line 179 column 7
    

    所以错误是“状态结构必须有'identifier'和'STATE'字段”,这是什么意思?

    1 回复  |  直到 6 年前
        1
  •  3
  •   Syed Saad    6 年前

    显然,应该包含文件的完整路径以使其正常工作。即使文件位于同一目录中,它也无法加载文件本身。