I used the latest dll ‘Aspose.Cells for .NET v7.3.4.3’ , in this case the charts with formulas which refer to other worksheets appear blank.
Where as in the previous version the formulas were not removed from the chart cells even after calling Cells.RemoveFormulas(), hence it was showing wrong charts.
With the old version of 'Aspose.Cells' I am getting :
1. charts with repeating bars.
2. Updated values in other worksheet not getting reflected in the barchart (ex: the cells I am updating in the code are reflected in normal cells in report worksheet but not in the chart ).
Using new version of the dll, results in empty charts.
Please find attached a sample excel to replicate the issue.
I can notice the issue as you have mentioned. The charts are blank in the output PDF but in the re-saved XLSX file, the charts are shown. I used the template file provided by you with the following code.
Sample code:
string fileName = @"e:\test2\Sample.xlsx"; var workbook = new Workbook(fileName); Cells cells = workbook.Worksheets["MainPage"].Cells;
Kindly let me know the status of the issue. Also give me a proposed date by which I can expect the fix, as there is dependency of pdf reports in an important module.
We bought the ASPOSE.CELLS for .Net license now can we get in this ASPOSE.PDF for getting resolved as a work around and get this for my current release as i don't have few weeks for this issue to be fixed. Please reply.
Thanks for your posting and using Aspose.Cells for .NET.
Well, you cannot use Aspose.Pdf with Aspose.Cells license. If you have Aspose.Total license then you can use any Aspose component.
However, I have a good news for you. I were finally able to successfully get the output pdf with your charts.
Please see the following code taken from your original code. I have added a new code inside it, which actually converts all of your charts into images and add them inside the target worksheet.
Then it saves the target workbook into pdf format. Please check the attached output pdf generated by this code and screenshot for your reference.
You can see, now your charts appear inside the output pdf.
for (int i = 0; i < workbook.Worksheets.Count; i++)
{
if (i != workbook.Worksheets.ActiveSheetIndex)
workbook.Worksheets[i].IsVisible = false;
}
workbook.Save(@“D:\Filetemp\dest.pdf”);
If you only copy one worksheet
(which contains charts) to other workbook , the data source of the copied chart
should refer to original file.
If original file is opening and the changed
data is not saved, we will convert the chart to image with unchanged data in the
original file because we could not know which file has been opened.