hutool Excel导入导出

本文介绍如何在考试系统中利用Hutool库实现试题的Excel模板下载和导入功能,详细阐述了使用流方式下载试题模板以及进行试题导入的操作流程。
摘要由CSDN通过智能技术生成

需求:考试系统中需要做一个试题的导入导出功能

使用hutool 试题模板下载(使用流方式下载)
       @ApiOperation(value = "试题模板下载")
    @PostMapping("import/template")
    public void quImportTemplate(HttpServletResponse response) throws IOException {
   
        QuExportDTO redioQuExport = new QuExportDTO();
        redioQuExport.setRepos("导入题库");
        redioQuExport.setQuType("单选题");
        redioQuExport.setQuContent("公司总部在哪里");
        redioQuExport.setAnswerContent("(A)上海(B)郑州(C)北京(D)苏州");
        redioQuExport.setIsRight("A");
        redioQuExport.setQuAnalysis("上海");
        redioQuExport.setQuScore("6");

        QuExportDTO judgeQuExport = new QuExportDTO();
        judgeQuExport.setRepos("导入题库");
        judgeQuExport.setQuType("判断题");
        judgeQuExport.setQuContent("公司的创始人是XX");
        judgeQuExport.setAnswerContent("(A)错误(B)正确"
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值