| | |
| | | package com.product.file.util; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | import com.aspose.cells.Cells; |
| | | import com.aspose.cells.PdfSaveOptions; |
| | | import com.aspose.cells.Workbook; |
| | | import com.aspose.cells.Worksheet; |
| | | import com.aspose.cells.WorksheetCollection; |
| | | import com.aspose.cells.*; |
| | | import com.aspose.slides.Presentation; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.aspose.words.*; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.file.config.FileCode; |
| | | |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | public class AsposeUtil { |
| | | private static int OFFICE_XLS = 1; |
| | |
| | | if (officeType.equals("doc") || officeType.equals("docx")) { |
| | | Word2Pdf(officePath, outFile); |
| | | } else if (officeType.equals("xls") || officeType.equals("xlsx")) { |
| | | // Excel2Pdf(officePath,outFile); |
| | | Excel2Html(officePath, outFile); |
| | | Excel2Pdf(officePath,outFile); |
| | | // Excel2Html(officePath, outFile); |
| | | // xls2xlsx(officePath,outFile,officeType); |
| | | } else if (officeType.equals("ppt") || officeType.equals("pptx")) { |
| | | PPT2Pdf(officePath, outFile); |