Support a simple conversion without load+save combo

Hi, our use case for Aspose.Cells is to simply convert an input file to a different format without any modification, like following:

public void convert(@NotNull File input, @NotNull File output, int saveFormat) throws Exception {
    LoadOptions loadOptions = new LoadOptions();
    loadOptions.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);
    Workbook workbook = null;

    try (
            InputStream is = new BufferedInputStream(new FileInputStream(input));
            OutputStream os = new BufferedOutputStream(new FileOutputStream(output))
    ) {
        workbook = new Workbook(is, loadOptions);
        workbook.save(os, saveFormat);
    } finally {
        if (workbook != null) {
            workbook.dispose();
        }
    }
}

The problem is that this consumes two credits - one for loading and one for saving. Isn’t there a way to simply convert a file from one format to another which would consume just a single credit?

@tomasbelusky

It is the predefined pricing policy for processing files. Formulating overly complex pricing rules is not only unfavorable for users’ understanding and usage of the product, but also impacts its implementation and performance. We are afraid we cannot change this behavior soon. But we may investigate such kind of situation further in future and give feedback when we can provide better solution.

1 Like