我正在尝试从marklogic访问excel文件。尝试获取清单时,我收到无效的zip文件错误。
const fileName = "https://www.cisco.com/c/dam/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center/1-3/supported/devices/DNA1_3-Supported-Devices-List.xlsx";
var response = xdmp.httpGet(fileName, { "verifyCert": false, "encoding": "auto" }).toArray();
var excelFile = response[1];
xdmp.zipManifest(excelFile);
错误:
XDMP-INVZIP:> xdmp.zipManifest(Document(BinaryNode(“ e4ad90d0831406080080021e5a29ee89dabc6ac00dc9f0013c888e48d9be6b9afe6 ...”))-无效的zip文件
答案 0 :(得分:3)
我相信编码选项是罪魁祸首。如果我删除了编码选项,这对我有用:
{ "verifyCert": false }
或将编码设置为UTF-8:
{ "verifyCert": false, "encoding": "UTF-8"}