aspose 导出为excel水印

在测试用aspose导出为excel时一直有水印,网上去水印的license文件都是一样的,求去水印有效办法

clipboard.png

clipboard.png

public  void excel2sql1() {
        if (!getLicense()) {          // 验证License 
        }
        try {
                File pdfFile = new File("D:/aspose/cs123.xls");// 输出路径
                Workbook workbook = new Workbook(); //工作簿
                Worksheet sheet = workbook.getWorksheets().get(0); //工作表
                Cells cells = sheet.getCells();//单元格
                cells.get(0,0).putValue("123455");


                FileOutputStream fileOS = new FileOutputStream(pdfFile);
                workbook.save(fileOS, SaveFormat.XLSX);
                fileOS.close();
        } catch (Exception e) {
                e.printStackTrace();
        }
    }
public static boolean getLicense() {
        boolean result = false;
        try {
            InputStream is = Test.class.getClassLoader().getResourceAsStream("license.xml"); //  license.xml应放在..\WebRoot\WEB-INF\classes路径下
            License aposeLic = new License();
            aposeLic.setLicense(is);
            result = true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
<License>
  <Data>
    <Products>
      <Product>Aspose.Total for Java</Product>
      <Product>Aspose.Words for Java</Product>
    </Products>
    <EditionType>Enterprise</EditionType>
    <SubscriptionExpiry>20991231</SubscriptionExpiry>
    <LicenseExpiry>20991231</LicenseExpiry>
    <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
  </Data>
  <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
阅读 5k
1 个回答

license不合法,所以仍然以评估模式运行,就会有水印。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题