youla
V2EX  ›  问与答

Vue 有什么插件可以打开云端的 xlsx 文件么?

  •  
  •   youla · Sep 28, 2020 · 2001 views
    This topic created in 2258 days ago, the information mentioned may be changed or developed.

    稍微看了一些例如 js-xlsx,貌似是从本地上传打开,不知道和直接打开云端的是否有区别。

    6 replies  •  2020-09-28 12:05:24 +08:00
    imherer
    imherer
    Sep 28, 2020
    1
    本地上传打开不也是上传到服务器然后再打开么?
    youla
    youla
    OP
    Sep 28, 2020
    2
    @imherer 但是本地打开的,自己改动的代码可能会多一点,就想问问有没有无脑一点的。
    Danswerme
    Danswerme
    Sep 28, 2020 via Android
    3
    ajax 获取云端 xlsx 文件并转 blob,然后 js-xlsx 读取,这样可行?
    youla
    youla
    OP
    Sep 28, 2020
    4
    @Danswerme 正准备用 axios,里面可以设置 responseType:blob,应该会比较简单。
    Danswerme
    Danswerme
    Sep 28, 2020 via Android
    5
    @youla 应该可行的,另外不知道读这个有没有跨域问题,你可以研究一下。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4547 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:16 · PVG 14:16 · LAX 22:16 · JFK 01:16
    ♥ Do have faith in what you're doing.