We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Update PivotTable problem

Hi,

In excel workbook, I replace a data sheet with other data. But after, I need update a pivot table. I do it

IWorksheet sheetTabla = workbook.Worksheets["tabla"];
IPivotTable pivotTable = sheetTabla.PivotTables[0];                   
PivotTableImpl pivotTableImpl = pivotTable as PivotTableImpl;                   
pivotTableImpl.Cache.IsRefreshOnLoad = true;

But when I update, the table change some field configuration:
  1. Check "show elements without data" is unchecked when this check is checked originally

Image por point 1



So, I've two questions:

  1. How can I check this option
  2. How can I update only a range, not all pivot table
Thanks

5 Replies

KC Karthikeyan Chandrasekar Syncfusion Team February 4, 2019 07:17 AM UTC

Hi Manolo, 
                    Query 
           Answer 
How can I check this option 
We have confirmed that this as an issue with “ShowAll item is not enabled while re-saving the file with pivot table” and this issue will be fixed in 2019 Vol-1 release which is expected to be available in March 2019. 

How can I update only a range, not all pivot table 
To achieve your requirement, we request you to set IsRefreshOnLoad property as “False” as shown below. 
 
Code snippet : 
pivotTableImpl.Cache.IsRefreshOnLoad = false; 

To know more about pivot table, we have shared UG documentation link for your reference. 

Regards, 
Karthikeyan  



MC Manolo Capdevila February 4, 2019 08:42 AM UTC

Hi,

Thanks for your answer.

About question 1:

Can I have the patch before?

About question 2:

Doing 

pivotTableImpl.Cache.IsRefreshOnLoad = true

It refresh all pibot table, I need refreh only a range.

I attach an example with my problem and possible solutions:

I need replace the sheet "informe_reparto" with new data. The new data is slrc_informe_reparto2019MQ.csv

Sheet "Tabla" in template excel. The column "TIPO_ANALISIS" has empty values



When I attach the new data, and refresh, the row "3-LLEGA TARDE" is deleted, so, the right columns is wrong.


I think that my problem is that show elements without data in TIPO_ANALISIS field is unchecked.But I'm not sure that's the problem

For other hand, if I open excel without update the pivot table, and refresh manually only the columns D to G, data is showed correct. For the moment this solution can works for me. But I don't know how refresh only certain columns of the pivot table

Thanks


Attachment: xlsioPivotTable_c8e0fc2c.zip


KC Karthikeyan Chandrasekar Syncfusion Team February 7, 2019 12:09 PM UTC

Hi Manolo, 
About question 2: 
We are able to reproduce this issue, we will provide you the fix on 20th Feb. 

About question 1: 
We have fixed an issue with ShowAll item is not enabled while re-saving the file with pivot table. The patch can be downloaded from the following locations.     
 
Recommended approach - exe will perform automatic configuration         
Please find the patch setup from below location:                      
  
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment         
Please find the patch assemblies alone from below location:                
   
Assembly Version: 16.3.0.21
Installation Directions : 
This patch should replace Syncfusion.XlsIO.Base.dll  under the following folder.          
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.6
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 16.3.0.21\precompiledassemblies\ 16.3.0.21\4.6

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies. 

Note:                  
You can change how you receive bug fixes by navigating to the following link and updating your preferences.               

Disclaimer : 
Please note that we have created this patch for version 16.3.0.21 specifically to resolve the issues reported in this Forum 142414.               

If you have received other patches for the same version for other products, please apply all patches in the order received.               

This fix will be included in our future release 2019 Volume 1 which will be rolled out at the end of March 2019. 
Regards, 
Karthikeyan  



MC Manolo Capdevila February 7, 2019 05:00 PM UTC

Hi

I'm sorry. I don't know if I apply correctly the path, but I've the same error.

I've tested run the exe patch setting the checking "Run assembly manager checkbox option" and load manually the dll from zip file.

In both cases, when I've update the pivot table, rows without data disappear

I attach an project example

Attachment: ConsoleApp4_64e7d86d.zip


KC Karthikeyan Chandrasekar Syncfusion Team February 8, 2019 09:45 AM UTC

Hi Manolo, 
We suspect the issue is due to the assemblies are behind referred from the GAC. However, we have created a new incident under your portal for further followup. You may get the assemblies of your product version through the incident. 
Regards, 
Karthikeyan  


Loader.
Live Chat Icon For mobile
Up arrow icon