使用PowerShell/Curl下载时Excel文件损坏 [英] Excel file getting corrupted while downloading using PowerShell/Curl

查看:79
本文介绍了使用PowerShell/Curl下载时Excel文件损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用PowerShell/Curl脚本从Artifactory将Excel文件下载到本地计算机.正在创建Excel文件,但是当我打开工作表时,出现以下消息,并且其中没有数据.

I am trying to download an Excel file from Artifactory to my local machine using a PowerShell/Curl script. The Excel file is getting created, but when I open a sheet I am getting the below message and there is no data in this.

"DataSheet_DEP.xls"的文件格式和扩展名不匹配.该文件可能已损坏或不安全.除非您信任其来源,否则请不要打开它.您是否仍要打开它?

The file format and extension of 'DataSheet_DEP.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?

curl.exe -k -u artifactory_TEMP:Password16 https://../artifactory/../DataSheet_DEP.xls --output  D:\ABC\Team Members\Datasheet\DataSheet_DEP.xls

仅在97-2003工作簿(.xls)中添加Excel文件.我可以手动下载文件,而没有任何问题.

Just to add Excel file is in 97-2003 workbook (.xls). I am able to download the file manually without any issue.

推荐答案

现在已解决.感谢所有尝试在此提供帮助的人

This is resolved now.. I was using wrong artifactory path. Thanks everyone who tried to help here

这篇关于使用PowerShell/Curl下载时Excel文件损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆