Read Pivot Tables
"Morsberger, David (PERATON)" <[email protected]> Thu, 27 Jun 2024 15:34:44 +0000
| Newsgroups | gmane.comp.jakarta.poi.user |
|---|---|
| Message-ID | <PH1P110MB12498D448FA3BA8E27BC2F2890D7A@PH1P110MB1249.NAMP110.PROD.OUTLOOK.COM> |
--_004_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_
Content-Type: multipart/alternative;
boundary="_000_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_"
--_000_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
We are trying to read Pivot Tables using Apache POI v5. As expected, Excel =
aggregates the values in the Pivot Table or shows the individual values if =
the '+' is expanded.
Apache POI behaves different depending on how the Excel xlsx file is saved.=
The cell value from POI returns the aggregate if the Excel file is saved w=
ith the '+' is not expanded and POI returns the individual cell values when=
Excel file is saved with the '+' is expanded ('-').
Is there a way through Apache POI to always return the individual values in=
dependent on how the Excel file was saved?
--
David Morsberger
System Architect
Mobile: 301-758-7387
Office: 240-709-3326
[Peraton_Email Signature]<https://www.peraton.com/>
--_000_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#467886" vlink=3D"#96607D" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">We are trying to read Pivot Tables using Apache POI =
v5. As expected, Excel aggregates the values in the Pivot Table or shows th=
e individual values if the ‘+’ is expanded.
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Apache POI behaves different depending on how the Ex=
cel xlsx file is saved. The cell value from POI returns the aggregate if th=
e Excel file is saved with the ‘+’ is not expanded and POI retu=
rns the individual cell values when Excel file
is saved with the ‘+’ is expanded (‘-‘). <o:p></o:=
p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Is there a way through Apache POI to always return t=
he individual values independent on how the Excel file was saved?
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D;mso-ligatures:none">--<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size:12.0pt;color:#1F497D;mso=
-ligatures:none">David Morsberger<o:p></o:p></span></b></p>
<p class=3D"MsoNormal"><span style=3D"color:#00B0F0;mso-ligatures:none">Sys=
tem Architect<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D;mso-ligatures:none">Mob=
ile: 301-758-7387<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D;mso-ligatures:none">Off=
ice: 240-709-3326<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D;mso-ligatures:none"><o:=
p> </o:p></span></p>
<p class=3D"MsoNormal"><a href=3D"https://www.peraton.com/"><span style=3D"=
color:blue;text-decoration:none"><img border=3D"0" width=3D"104" height=3D"=
29" style=3D"width:1.0833in;height:.302in" id=3D"Picture_x0020_1" src=3D"ci=
d:[email protected]" alt=3D"Peraton_Email Signature"></span></=
a><span style=3D"color:#1F497D;mso-ligatures:none"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>
--_000_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_--
--_004_PH1P110MB12498D448FA3BA8E27BC2F2890D7APH1P110MB1249NAMP_--