Final file missing when converting html to excel using On Premise

@rajatdpw,

We do not find data with your provided email. Please check your provided email.

Please use jayakrishna.alwar[at]dpworld.com

Sorry for the confusion

@rajatdpw,

Okay, we got the log data and we will go to check.

@rajatdpw,

Please refer to the following code. and try to use Aspose.Cells Cloud SDK for Node to test the conversion case.

const clientId = process.env.CellsCloudClientId;
const clientSecret = process.env.CellsCloudClientSecret;
const ApiURL = process.env.CellsCloudApiBaseUrl;
const localPath = “TestData/”;
var fs = require(‘fs’);
var path = require(‘path’);
var assert = require(‘assert’);
describe(‘Conversion test’, function() {

  this. Timeout(200000);
const cellsApi = new api.CellsApi(clientId, clientSecret,"v3.0",ApiURL);
describe('convert html to xlsx test', function(){
  it("should call PutConvertWorkbook successfully" , function(){
    var remoteFolder = "htmlToExcelFilesData/"
    var localName = "ToxXlsx.html"
    var remoteName = "output-fje5tj.xlsx"
    var format = "html"
    var mapFiles = {};           
    mapFiles[localName]= fs.createReadStream(localPath  +localName) ;
    var request = new model.PutConvertWorkbookRequest();
    request.file =  mapFiles;
    request. Format = "xlsx";
    request.streamFormat =  format;
    request.outPath = remoteFolder + remoteName;
    return cellsApi.putConvertWorkbook(request).then((result) => {
        expect(result.response.statusCode).to. Equal(200);
    });
  });
}); 

});

The following figure shows the running structure:

And you can check your Cloud API run details with Fiddler.

Hi @wangtao. We are leveraging on Premise approach for file conversion. Cloud api is anyways working but there is latency issue. Which is why we are using aspose.cells docker image.

@rajatdpw,
Thank you for choosing Aspose.Cells, and you can also refer to Aspose.Cells Cloud Docker.

@wangtao We have been already using on Premise approach (using cells docker image) for excel to pdf conversion. That is working fine, like we are getting converted files in azure file share, which is mounted in pv-yaml file.

The main issue while converting html to excel is, i am getting a successfull message as shown above in first message, but file is not present in location.I was wondering if you could kindly help something in this regard. Thank you for your support so far

@rajatdpw,

From your code parameters and response, the file should be in the "htmlToExcelFilesData“ folder of the Aspose Cloud default storage space.

Yes. Ideally it should be. Can you confirm like if I am getting below response, does that mean file conversion has happened?

    {
  FileInfo: {
    Name: 'output-09ov32.xlsx',
    Size: 9255,
    Folder: 'htmlToExcelFilesData'
  },
  Code: 200,
  Status: 'OK'
}

Because, If you see my request body in first message, I am sending data as htmlStream in form data as:

let data = new FormData();
data.append('file', htmlStream);

I even tried with, data.append(‘document’, htmlStream) and I got same response. I am not sure how the api is behaving in both the cases. can you confirm?

@rajatdpw,

In theory, if you receive the above response, it indicates that the file conversion was successful.
There are two ways we can parse the FormData data you added, and typically, we determine the input file type based on the query parameter “streamFormat.”

Hi @wangtao. Considering I am getting a correct response but file is not present at expected location, I think problem is that I am not giving storageName in query params as shown in the swagger UI:

image.jpg (339.8 KB)

Can you please help me, like as per our last discussion in this chat: link , I am giving storageName as ‘First Storage’.

Rest is all same like there is a json file at mounted path with same configuration. Can you please let me know if anything needs to be done here.

PS: I tried by giving storageName as ‘File Storage’ , still no luck :frowning:

@rajatdpw,

This is a strange issue.
I will create a ticket number for it. And I’ll simulate the way you mentioned handling problem occurrences.
I wish I could reproduce this issue.

1 Like

@rajatdpw
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSCLOUD-12348

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi @wangtao. Waiting for your response if you were able to replicate the said issue.

Thank you for your reply. Can you please elaborate like which two documents you are referring to and what are you processing exactly? Since I get a 200 ok response, main issue which I believe is to check how storageName is being set and if any configuration is required for same. Please feel free to discuss if you find anything.

@rajatdpw,

I’ll use Aspose.Cells Cloud API reference to demonstrate the conversion process, so please check the differences with yours.

  1. First check whether the default storage space is normal.

  2. Input conversion parameters, the parameter of the Storage name uses the default value.

  3. Check the executed result.

  4. Check output file.

Hi @wangtao. Thank you so much for brief explanation. Actually I believe you have shared steps for using cloud api. The same is working for me as I had mentioned earlier.

The problem we are facing is with on Premise approach i.e, we are using docker image of aspose cells and running these apis locally. For that we have mounted the destination folder as I mentioned in above comment. If possible, I request you to kindly try with the on premise approach.

@rajatdpw,

Now, I want to confirm if you’re using Aspose.Cells Docker or Aspose.Cells Cloud Docker? and the operating system environment in which it resides.

We are using Aspose.cells Docker. OS in which system environment runs is linux.

Please refer to our chat: link for more understanding as how am i using it.

@rajatdpw,

If you are using Aspose.Cells Docker, you need to consult Aspose.Cells Product Family - Free Support Forum - aspose.com for details support.
And I can only give you some advice, I hope it will help you.
If you use Aspose.Cells convert formats in Docker and save files to folders in Docker, then you need to mount Docker data volumes and map folders in Docker to local folders.
And I recommend uploading directly to the remote server in Docker.