本帖最后由 Joestar.Xu 于 2024-8-29 12:09 编辑
产品:GcExcel
版本:6.2.1
问题编号:DOCXLS-9272
LastReview:2024-8-29
7.2.0已修复。
复现步骤
1、将原始ssjson通过官网保存为sjs
2、通过demo代码将步骤1得到的sjs保存为新的sjs文件,注意修改下得到的文件后缀名
- public void test(@RequestParam("file") MultipartFile file, HttpServletResponse response) throws IOException {
- ByteArrayInputStream bais = new ByteArrayInputStream(file.getBytes());
- Workbook workbook = new Workbook();
- Workbook.SetLicenseKey("demo");
- workbook.setCulture(Locale.CHINESE);
- workbook.open(bais, OpenFileFormat.Sjs);
- byte[] reportDataSjs = GcExcelHelper.toSjs(workbook);
- response.reset();
- response.setContentType("application/octet-stream");
- response.setCharacterEncoding("utf-8");
- ServletOutputStream outputStream = response.getOutputStream();
- outputStream.write(reportDataSjs);
- outputStream.flush();
- outputStream.close();
- }
复制代码
3、通过官网打开步骤2得到的sjs文件,出现样式丢失问题
|
|