You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pierre Lavignotte <pi...@gmail.com> on 2008/08/19 15:23:08 UTC
Copy HSSFDataValidation
Hello,
I have a template workbook as follow :
- first row contains columns headers,
- second row contains data cells and formula cells,
- cells on second row can have styles and data validation rules.
My application has to dynamicaly insert data into data cells of rows 2
to N and copy formulas, styles and data validation down from row 2 to
N.
I've wrote the code to perform the formula and style copy but I can't
understand how I can access the HSSFDataValidation items allready
existing in the workbook or sheet.
I've found some code explaining how to create HSSFDataValidation items
but I don't understand either how to link them to cells...
Any help is welcome.
Thank you for your great job,
Pierre
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Set cells borders
Posted by Constantin Volozhin <cv...@pragmaticsoft.com>.
Ok. Thank you.
> Current implementation can create new tables but can't modify the structure of existing ones.
> Once a table is added to the slide, the number of shapes (cells and lines) is immutable.
>
> Yegor
>
> > Hi. Setting of table cells borders doesn't work if table added to slide
> > already. Is this feature or bug?
> >
> > This code doesn't produce cell borders:
> >
> > slide.addShape(pptTable);
> > pptTable.moveTo(shape.getAnchor().x, shape.getAnchor().y);
> >
> > TableCell cell3 = pptTable.getCell(1, 2);
> >
> > cell3.setBorderLeft(new Line());
> > cell3.setBorderRight(new Line());
> > cell3.setBorderBottom(new Line());
> > cell3.setBorderTop(new Line());
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > For additional commands, e-mail: user-help@poi.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Set cells borders
Posted by Yegor Kozlov <ye...@dinom.ru>.
Current implementation can create new tables but can't modify the structure of existing ones.
Once a table is added to the slide, the number of shapes (cells and lines) is immutable.
Yegor
> Hi. Setting of table cells borders doesn't work if table added to slide
> already. Is this feature or bug?
>
> This code doesn't produce cell borders:
>
> slide.addShape(pptTable);
> pptTable.moveTo(shape.getAnchor().x, shape.getAnchor().y);
>
> TableCell cell3 = pptTable.getCell(1, 2);
>
> cell3.setBorderLeft(new Line());
> cell3.setBorderRight(new Line());
> cell3.setBorderBottom(new Line());
> cell3.setBorderTop(new Line());
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Set cells borders
Posted by Constantin Volozhin <cv...@pragmaticsoft.com>.
Hi. Setting of table cells borders doesn't work if table added to slide
already. Is this feature or bug?
This code doesn't produce cell borders:
slide.addShape(pptTable);
pptTable.moveTo(shape.getAnchor().x, shape.getAnchor().y);
TableCell cell3 = pptTable.getCell(1, 2);
cell3.setBorderLeft(new Line());
cell3.setBorderRight(new Line());
cell3.setBorderBottom(new Line());
cell3.setBorderTop(new Line());
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Copy HSSFDataValidation
Posted by Pierre Lavignotte <pi...@gmail.com>.
Hi again,
I'm still looking after a way to read/write data validation (List of
values) into cells.
The example code I've found to add a new HSSFDataValidation to a sheet
crashes my Excel when I open back the document and I haven't found
anything about how to read the existing validation records from a
workbook or a sheet.
To be continued...
Pierre
On Tue, Aug 19, 2008 at 3:23 PM, Pierre Lavignotte
<pi...@gmail.com> wrote:
> Hello,
>
> I have a template workbook as follow :
> - first row contains columns headers,
> - second row contains data cells and formula cells,
> - cells on second row can have styles and data validation rules.
>
> My application has to dynamicaly insert data into data cells of rows 2
> to N and copy formulas, styles and data validation down from row 2 to
> N.
>
> I've wrote the code to perform the formula and style copy but I can't
> understand how I can access the HSSFDataValidation items allready
> existing in the workbook or sheet.
>
> I've found some code explaining how to create HSSFDataValidation items
> but I don't understand either how to link them to cells...
>
> Any help is welcome.
>
> Thank you for your great job,
> Pierre
>
--
Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org