Workbook.Save method is not working as expected

@ahsaniqbalsidiqui

We have below aspose dlls.
Aspose.Cells20.9.6
Aspose.Cells20.9.11

@rpunde,

You may download/get Aspose.Cells for .NET v20.10 here. You may also get the version @ Nuget repos (NuGet Gallery | Aspose.Cells 20.10.0).

Can you please attach dlls here so that i can download from here.

@rpunde,

The size of zipped archive (for all Dlls) is big, so we cannot attach bigger files here. We have uploaded the Dlls in Downloads section here, so kindly do download the zipped archive (Dlls version) and get your desired Dll(s) when extracting the archive.

Thanks @Amjad_Sahi

I have downloaded the dll’s. Let me try now.

@rpunde,

You are welcome and take your time to evaluate the new version.

@Amjad_Sahi

Now chart issue is fixed. Its working fine.

Thanks for help.

@Amjad_Sahi

We have one more issue
Some of header values are not displaying properly.
When we select zoom to page level(64%) in pdf then it shows proper header but when we do zoom - 100% then some of header top is missing.

CheckZomm Issue_Files.zip (45.8 KB)
attached pdf files.

@rpunde,

Could you share the sample code (runnable) that you are using when converting your attached file to PDF file format, we will check it soon.

@Amjad_Sahi ,

Actually we are just reading excel and save in pdf.

var workbook = new Workbook(src);
workbook.Save(src);
workbook.Dispose();

            workbook = new Workbook(src);

            CleanupSheets(workbook);


            workbook.CalculateFormula();
            PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
                          //pdfSaveOptions.AllColumnsInOnePagePerSheet = true;
            foreach (Worksheet wks in workbook.Worksheets)
            {
                wks.PageSetup.SetFitToPages(1, 0);
                //wks.AutoFitRows();  Commented as part of Stitcher migration
                                
            }
            workbook.Save(dest, pdfSaveOptions);

@rpunde,

I checked and this might not an issue with Aspose.Cells. For confirmation, please open your template file into MS Excel and open Page Setup dialog box. Now set Fit to “1” pages wide by “0” tall option and take the Print Preview of the sheet and you will get the same display. To cope with it, please auto-fit your specified rows to get proper display in the output PDF file. Please note, Aspose.Cells renders the same display (for PDF) which is shown in Print Preview of Excel sheet. See the following lines of code:
e.g
Sample code:

.........
 workbook.CalculateFormula();
            PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
            foreach (Worksheet wks in workbook.Worksheets)
            {
                wks.PageSetup.SetFitToPages(1, 0);
                wks.AutoFitRows();
            }  
.....

Hi Team,

There is one more issue we found in chart. It was working fine before we use Aspose.

In Y axis values are going outside the chart. Attached the input and output files.
Aspose_ShareReports.zip (83.7 KB)

Thanks
Ranjana

@rpunde,

After an initial test, I am able to reproduce the issue as you mentioned by using the following sample code with your template file. I found some y-axis values are going outside the chart as per your attached screenshots.
e.g.
Sample code:

Workbook wb = new Workbook(stringfilePath);
wb.CalculateFormula();
            PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
            foreach (Worksheet wks in wb.Worksheets)
            {
                wks.PageSetup.SetFitToPages(1, 0);
                wks.AutoFitRows();
            }

wb.Save("E:\\test2\\out1.pdf", pdfSaveOptions);

I have logged a ticket with an id “CELLSNET-47697” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Hi @Amjad_Sahi

Any updates on above issue?

Thanks
@rpunde

@rpunde,
We are gathering information in this regard and will share our feedback soon.

@rpunde,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@Amjad_Sahi

Thanks for update. Its great news for us.

Thanks
@rpunde

@rpunde,

You are welcome.

@Amjad_Sahi ,

May I know when we will get new version aspose dll’s ?

Thanks
@rpunde

@rpunde,

Hopefully, in the next couple of days, we will share the fix with you.