Aspose.Cells - Unable to convert .xlsx to .xml

Hello,

We are currently receiving this message when trying to convert .xlsx to .xml using the aspose.cells api. This was working for us on 7/6/2020, but started failing on 7/9/2020.

This is the message we’re seeing in our usage report

Error: PostDocumentSaveAs. Parameters: name ‘test4.xlsx’, newfilename ‘test4.xml’, isAutoFitRows ‘True’, isAutoFitColumns ‘True’. Exception: AmazonS3 Storage exception: The specified key does not exist. Bucket ‘afc-filestorage’, FilePath ‘84768/04808570-b273-40d8-8050-d520d99a7bcb/test4.xlsx’.

We have confirmed that the file is uploaded to the S3 bucket setup with our account:
image.png (38.9 KB)

Here’s a snippet of the code we’re using. You’ll see that we’re using the same storage name for both the upload call and the conversion call:

CellsApi api = new CellsApi(asposeAppSid, asposeAppKey)
api.getApiClient().getHttpClient().setReadTimeout(1200, TimeUnit.SECONDS)
try {
    //upload the xlsx file to cloud
    String remoteFilePath = UUID.randomUUID().toString() + ".xlsx"
    CellsFilesUploadResult uploadResult = api.uploadFile(remoteFilePath, srcFile, ASPOSE_CLOUD_STORAGE_NAME)
    if (uploadResult?.getUploaded()?.size() != 1) {
        throw new Exception("Failed to upload source file '${srcFile}' to aspose cloud: ${uploadResult?.toString()}".toString())
    }

    //convert to xml
    SaveOptions options = new SaveOptions()
    options.saveFormat("xml")
    String remoteXmlPath = UUID.randomUUID().toString() + ".xml"
    SaveResponse conversionResult = api.cellsSaveAsPostDocumentSaveAs(remoteFilePath, options, remoteXmlPath, true, true, "", ASPOSE_CLOUD_STORAGE_NAME)
    if (conversionResult?.getCode() != 200) {
        throw new Exception("Aspose cloud failed to convert xlsx file '${srcFile}' to xml: ${conversionResult?.toString()}".toString())
    }

    //download the xml file
    result = api.downloadFile(remoteXmlPath, ASPOSE_CLOUD_STORAGE_NAME, null)
} finally {}

on the api.cellsSaveAsPostDocumentSaveAs call we catch this exception:

com.aspose.cloud.cells.client.ApiException: Internal Server Error
	at com.aspose.cloud.cells.client.ApiClient.handleResponse(ApiClient.java:1255)
	at com.aspose.cloud.cells.client.ApiClient.execute(ApiClient.java:1151)
	at com.aspose.cloud.cells.api.CellsApi.cellsSaveAsPostDocumentSaveAsWithHttpInfo(CellsApi.java:26780)
	at com.aspose.cloud.cells.api.CellsApi.cellsSaveAsPostDocumentSaveAs(CellsApi.java:26760)
	at com.aspose.cloud.cells.api.CellsApi$cellsSaveAsPostDocumentSaveAs$1.call(Unknown Source)

Any help here would be much appreciated.

Thanks!

@adaptiverx

We are sorry for the inconvenience. I have tested the scenario with my credentials and it is working fine. We will appreciate it if you please share your credentials (APP SID and Key) via private message (click on my user in the thread and use message option).

@adaptiverx

Thanks for sharing the additional information. We have managed to replicate the issue and logged a ticket STORAGE-128 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

@tilal.ahmad - do we have an estimate on when STORAGE-128 may be resolved? We are currently using this product in production, so we need to communicate some expectations to our clients.

Thanks,
AdaptiveRx

@adaptiverx

We have shared your concern with our product team, requested to complete the investigation and provide an ETA as soon as possible. We will keep you updated about the issue resolution progress within this forum thread. Thanks for your patience.

@adaptiverx

Meanwhile, please note when you configure external Amazon S3 storage, Aspose Cloud APIs need the following APIs access on the bucket. Otherwise, you will receive errors. Please double check it and confirm.

Required APIs access:

  • GetObjectMetadada API
  • ListObjects API

Optional APIs:

  • CopyObject API
  • PutObject API
  • GetPreSignedURL API
  • PutBucket API
  • PutBucketVersioning API
  • DeleteObject API
  • ListVersions API
  • GetObject API
  • DeleteBucket API

@adaptiverx

We have investigated the issue and found that latest Aspose.Cells Cloud version is not getting credentials by storage name. We are fixing the issue(CELLSCLOUD-10320) on high priority. Meanwhile, as a work around, you can set the ‘S3 Storage’ storage as default to the app in aspose.cloud dashboard.

@tilal.ahmad - thank you for that work around. We have made the switch and things are looking better. We will continue testing this morning and report back if we run into any other issues.

Thanks,
AdaptiveRx

1 Like

@adaptiverx

Thanks for your feedback. As an update, please note we have also fixed CELLSCLOUD-10320. You may use some REST Client or latest SDKs for the fix. Please feel free to contact us for any further assistance.