Re: Internal Sheet Name?

2016-05-25 Thread Javen O'Neal
XSSF or HSSF? If XSSF, have you looked inside the XML files to see if the
internal name is there?
On May 25, 2016 3:24 PM, "Blake Watson"  wrote:

> Is it possible to get the "(Name)" attribute of a sheet (rather than the
> "Name" attribute)? That is, using the "Balloon Payment Loan" calculator,
> there's a sheet called "BALLOON PAYMENT LOAN", but if you open up VBA,  you
> see the tree of objects, with one called "Sheet2 (BALLOON PAYMENT LOAN)".
>
> Can I get the "Sheet2" attribute, whatever it's called?
> --
>
> *Blake Watson*
>
> *PNMAC*
> Application Development Manager
> 5898 Condor Drive
> Moorpark, CA 93021
> (805) 330.4911 x7742
> blake.wat...@pnmac.com 
> www.PennyMacUSA.com 
>


Internal Sheet Name?

2016-05-25 Thread Blake Watson
Is it possible to get the "(Name)" attribute of a sheet (rather than the
"Name" attribute)? That is, using the "Balloon Payment Loan" calculator,
there's a sheet called "BALLOON PAYMENT LOAN", but if you open up VBA,  you
see the tree of objects, with one called "Sheet2 (BALLOON PAYMENT LOAN)".

Can I get the "Sheet2" attribute, whatever it's called?
-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.wat...@pnmac.com 
www.PennyMacUSA.com 


Re: How to access pivot table of very large excel using apache poi in java?

2016-05-25 Thread Dominik Stadler
Hi,

Not sure where "SaxDemo" is from as I did not find it in the POI sources,
but at least the XLSX2CSV demo (
https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java)
only reads some basic parts of the file. I fear your only chance is
probably to implement the additional handling based on how the pivot table
is stored in the .xlsx file.

Dominik.

On Tue, May 24, 2016 at 11:26 AM, Sowmya  wrote:

> Hi,
>
> I am trying to get data source of pivot table using apache poi . But the
> excel file is very large and the code below gives out of memory issue :
> FileInputStream fis = new FileInputStream(new File("demo.xlsx"));
> XSSFWorkbook workbook = new XSSFWorkbook(fis);
>
> I tried using Sax parser as below :
> SaxDemo example = new SaxDemo();
> example.processOneSheet("demo.xlsx");
>
> But by using this I can only read the cell contents . But I like to access
> pivot table. Is it possible to Sax parser , to return the processed sheet?
>
> Any help is great as I am stuck with this memory issue.
>
>
> Thanks,
> Sowmya
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/How-to-access-pivot-table-of-very-large-excel-using-apache-poi-in-java-tp5723108.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>


RE: Display embedded files on the document (.docx)

2016-05-25 Thread Murphy, Mark
I don't know the answer to your question, but what happens when you try to 
embed the same document using Word? What does the XML look like? What does the 
XML look like when you try to embed it with POI? Give us a minimal example of 
the problem so we can easily see what is happening. Then someone may be able to 
help you.

-Original Message-
From: marc yet [mailto:deflot@gmail.com] 
Sent: Wednesday, May 25, 2016 11:15 AM
To: user@poi.apache.org
Subject: Re: Display embedded files on the document (.docx)

Up
does someone have a solution ? I'm really stuck. :/

-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org


Re: Display embedded files on the document (.docx)

2016-05-25 Thread marc yet
Up
does someone have a solution ? I'm really stuck. :/


Re: Add complex footer to docx incrementing the page number

2016-05-25 Thread Dominik Stadler
Hi,

When I build a sample .docx and look at the the XML inside the docx,
contains the following for the page-item in the header:


 ...

 PAGE   \* MERGEFORMAT




w:p is CTP/XWPFParagraph, w:r is CTR/XWPFRun, and the CTR has a method
addNewInstrText() which might do what you need here via the low-level APIs
of POI.

Domink.

On Tue, May 24, 2016 at 6:04 PM, cathrop  wrote:

> I need a footer with 3 parts: the current date on the left, a field value
> (in
> this case the opportunity #) in the center and the page number on the right
> preceded by the word "Page ".
>
> I am able to create this footer with the following code without an
> incremented page number:
>
> CTSectPr sectPr =
> doc.getDocument().getBody().addNewSectPr();
> XWPFHeaderFooterPolicy policy = new
> XWPFHeaderFooterPolicy(doc, sectPr);
> CTP footerCtp = CTP.Factory.newInstance();
> CTR footerCtr = footerCtp.addNewR();
>
> XWPFParagraph footerCopyrightParagraph = new
> XWPFParagraph(footerCtp,
> doc);
>
>
> doc.getProperties().getExtendedProperties().getUnderlyingProperties().getPages();
> XWPFRun run = footerCopyrightParagraph.getRun(footerCtr);
> run.setText(dateOnlyFormat.format(calendar.getTime()));
> run.addTab();
> run.setText("OppNo = Q2W3E4R");
> run.addTab();
> run.setText("Page ");
> run.setFontSize(10);
> run.setFontFamily("Arial");
>
> BigInteger pos1 = BigInteger.valueOf(4500);
> setTabStop(footerCtp, STTabJc.Enum.forString("center"),
> pos1);
> BigInteger pos2 = BigInteger.valueOf(9000);
> setTabStop(footerCtp, STTabJc.Enum.forString("right"),
> pos2);
>
> XWPFParagraph[] footerParagraphs = {
> footerCopyrightParagraph };
> policy.createFooter(STHdrFtr.DEFAULT, footerParagraphs);
>
> this is the result:
> May 24, 2016   OppNo = 1Q2W3E4R
> Page
>
> I did find that by adding this line:
> footerCtp.addNewR().addNewPgNum();
>
> I get this result:
> 1May 24, 2016   OppNo = 1Q2W3E4R
> Page
> and on the second page:
> 2May 24, 2016   OppNo = 1Q2W3E4R
> Page
>
> How can I tie the two together so the incremented page number is to the
> right of the word "Page" like this?
>
> May 24, 2016   OppNo = 1Q2W3E4R
> Page 1
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/Add-complex-footer-to-docx-incrementing-the-page-number-tp5723124.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>