简体   繁体   English

无法使用 java 压缩 excel 文件(XLSX 或 XLS)

[英]Unable to compress excel file (XLSX or XLS) using java

In one of java sprint MVC based application, i need to compress size of excel file, because application is unable to send email attachment.在基于 java sprint MVC 的应用程序之一中,我需要压缩 excel 文件的大小,因为应用程序无法发送 email 附件。 any one please help任何人请帮忙

The formats with 'x' at the end are actually zip archives, so any more compression is moot.末尾带有“x”的格式实际上是 zip 档案,因此再压缩都没有意义。 You could unzip the Excel sheet and look for data based compression.您可以解压缩 Excel 工作表并查找基于数据的压缩。

  • Images in lower resolution.较低分辨率的图像。
  • Excel XML with less repetition of styles, attributes. Excel XML styles 属性重复较少。
  • Repeated expressions.重复的表达。
  • Maybe there are embedded fonts.也许嵌入了 fonts。

Here is a tutorial of how to Zip single/multiple files in Java which should get you what you require: http://www.kscodes.com/java/how-to-compress-files-in-java/这是一个关于如何在 Java 中处理单个/多个文件的教程,它应该可以满足您的需求: http://www.kscodes.com/java/how-to-compress-files-in-java/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM