apache+django调用xlwings出错 5C 40C

1.我用django调用xlwings打开一个Excel,修改部分内容后保存。
2.在 python manage.py runserver 0.0.0.0:80运行正常。
3.切换到Apache后出现如下错误:

com_error at /wang/supplement/
(-2147352567, '发生意外。', (0, 'Microsoft Office Excel', 'Microsoft Office Excel 不能访问文件“C:\\Program Files\\Apache24\\htdocs\\liuhao\\static\\media\\download\\会议-注射液-漠河-2018-12-07-13_48_02.xlsm”。 可能的原因有:\n\n• 文件名称或路径不存在。\n• 文件正被其他程序使用。\n• 您正要保存的工作簿与当前打开的工作簿同名。', 'C:\\Program Files (x86)\\Microsoft Office\\Office12\\2052\\XLMAIN11.CHM', 0, -2146827284), None)

4.我的http.conf:

Define SRVROOT "C:/Program Files/Apache24"
ServerRoot "${SRVROOT}"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so

LoadModule rewrite_module modules/mod_rewrite.so

<IfModule unixd_module>
User daemon
Group daemon
</IfModule>

ServerAdmin admin@example.com
ServerName localhost:80

<Directory />
    AllowOverride All
    Require all granted
</Directory>

DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

<Files ".ht*">
    Require all granted
</Files>

ErrorLog "logs/error.log"
LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access.log" common
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
</IfModule>

<IfModule cgid_module>
</IfModule>


<Directory "${SRVROOT}/cgi-bin">
    AllowOverride All
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
</IfModule>

Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-info.conf

<IfModule proxy_html_module>
Include conf/extra/httpd-proxy-html.conf
</IfModule>

<IfModule ssl_module>
Include conf/extra/httpd-ahssl.conf
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

<IfModule http2_module>
    ProtocolsHonorOrder On
    Protocols h2 h2c http/1.1
</IfModule>

LoadFile "c:/users/administrator/appdata/local/programs/python/python36/python36.dll"
LoadModule wsgi_module "c:/users/administrator/appdata/local/programs/python/python36/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win_amd64.pyd"
WSGIPythonHome "c:/users/administrator/appdata/local/programs/python/python36"

WSGIScriptAlias  / "${SRVROOT}/htdocs/website/website/wsgi.py"


WSGIPythonPath  "${SRVROOT}/htdocs/website"

<Directory "${SRVROOT}/htdocs/website"> 
    <Files wsgi.py> 
        Require all granted 
    </Files>    
</Directory>    


Alias /static/ "${SRVROOT}/htdocs/website/static/"
Alias /media/ "C:/Program Files/Apache24/htdocs/liuha/static/media/"

<Directory "${SRVROOT}/htdocs/website/static/"> 
    AllowOverride All  
    Options None
    Require all granted 
</Directory>

<Directory "C:/Program Files/Apache24/htdocs/website/static/media/">
    AllowOverride All  
    Options None
    Require all granted 
</Directory>
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!