简体   繁体   中英

excel pivot table data with percentage c#

I'm trying to create dynamic pivot tables,data comes from web service and fills to data sheet,then I'm creating pivot table with that data range.

I'm able to create pivot table but eventhough in data sheet some data's look like 10%,20% and format type is percentage , in pivot table values look like 0.10 , 0.20.

Is there any way to prevent excel's behaviour? Pivot table must show the values exactly like in data sheet.

right click on the values you want to format in the pivot table. Choose field settings In the dialogue click number formatting to set the display format. then

right click onthe pivot table and choose pivot table options check that "preserve cell formatting on update is ticked"

(this let to set explicitly what formatting to use on the pivot table. Note that when created it inherits the formatting from the cells it is based on, but it sounds like it's lost (or never had) this link.

Done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM