Does Aspose.Cells has Callback functionality?


#1

I’m using Aspose.Cells for .Net for converting an excel file to PDF.

If worksheet is large and "OnePagePerSheet’ is set to true then it takes considerable amount of time in converting.

Does Aspose.Cells provide any callback function which will tell me how much time is remaining to convert, So that I can update my progress bar accordingly.

Thanks in Advance,
Purnima


#2

Hi Purnima,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no such feature that could act as a callback function and let you know the progress of conversion from excel to pdf. However, we have logged your request in our database. We will look into it and see if it could be implemented. Once, there is some update for you, we will let you know asap.

This issue has been logged as CELLSNET-42029.


#3

Okay.

Thank You.

#4

Hi Shakeel,

Any news on this one. We too have a same requirement.

Cheers,
ValuePRO


#5

Hi,

Thanks for your posting and considering Aspose.Cells.

We are afraid, there is no update for you regarding this issue and this feature is not implemented as yet. However, we have logged your comment in our database for product team consideration and requested it to provide some fix or ETA for this issue. Once, there is some news for you, we will let you know asap.


#6

Hi,

Thanks for using Aspose.Cells.

If worksheet is large and "OnePagePerSheet’ is set to true, we can’t know the effective progress. We can’t do it now.

If the workbook has multi pages we can provide a callback with page index and all page count that you can know the converting progress.


#7

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-42029”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


#8

Please try our latest version/fix: Aspose.Cells for .NET v19.6.1 (attached)

Your issue should be fixed in it.

We add new API PdfSaveOptions.PageSavingCallback .
e.g
Sample code:

Workbook wb = new Workbook("Book1.xlsx");

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.PageSavingCallback = new TestPageSavingCallback();

wb.Save("outFile.pdf", pdfSaveOptions);
public class TestPageSavingCallback : IPageSavingCallback
{
    public void PageStartSaving(PageStartSavingArgs args)
    {
        Console.WriteLine("Start saving page index {0} of pages {1}", args.PageIndex, args.PageCount);

        //don't output pages before page index 2.
        if(args.PageIndex < 2)
        {
            args.IsToOutput = false;
        }
    }

    public void PageEndSaving(PageEndSavingArgs args)
    {
        Console.WriteLine("End saving page index {0} of pages {1}", args.PageIndex, args.PageCount);

        //don't output pages after page index 8.
        if(args.PageIndex >= 8)
        {
            args.HasMorePages = false;
        }
    }
}

Let us know your feedback.
Aspose.Cells19.6.1 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.6.1 For .Net4.0.Zip (4.9 MB)


#9

The issues you have found earlier (filed as CELLSNET-42029) have been fixed in Aspose.Cells for .NET v19.7. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi