doudouchan5830 2015-12-12 17:11
浏览 96

如何在使用PHPExcel加载文件时取消保护excel文件

i have excel file downloaded from web and its protected.
if i open that file and disable protection PHPExcel_IOFactory::load can open it
but there is anyway to PHPExcel unprotect file itself?
because i want my php code to download it automatically and open it
but if i cant set file unprotected by PHPExcel i must download it
set disable protection and then give it to PHPExcel_IOFactory::load
and its bad
my code:

 $inputFileName = './sampleData/ttt.xlsx';
    echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
    $objPHPExcel = PHPExcel_IOFactory::load($inputFileName);


    echo '<hr />';

    $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);

so PHPExcel have any function or class for unprotect file itsself? and sorry for my bad english

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 八爪鱼爬数据为什么自己停了
    • ¥15 交替优化波束形成和ris反射角使保密速率最大化
    • ¥15 树莓派与pix飞控通信
    • ¥15 自动转发微信群信息到另外一个微信群
    • ¥15 outlook无法配置成功
    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率