Ok No Problem, Thanks Pierre.

On Wed, Sep 10, 2008 at 1:39 AM, Pierre Lavignotte <
[EMAIL PROTECTED]> wrote:

> Sorry but I can't help you on that...
> I just know (a little) the DataValidation API because I've face the
> same problem than you few weeks ago.
>
> On Tue, Sep 9, 2008 at 9:52 PM, krishnanand thiyadath
> <[EMAIL PROTECTED]> wrote:
> > Hi Pierre,
> >
> > I have a excel file which is created using MS Excel application. I am
> trying
> > to read and do some modification in this file using POI. I have facing
> some
> > problem in that.
> >
> > I am using the following code, to add comments to a already existing cell
> in
> > a sheet.
> > In the same sheet, i also have a cell which acts as a drop down ( I mean
> a
> > cell with data validation type list and referring a named range).
> >
> >  File f = new File(filePath);
> >  FileInputStream fis = new FileInputStream(f);
> >  POIFSFileSystem fs = new POIFSFileSystem(fis);
> >  HSSFWorkbook wb = new HSSFWorkbook(fs);
> >
> >  HSSFSheet sheet = wb.getSheetAt(0);
> >  HSSFPatriarch patr = sheet.createDrawingPatriarch();
> >  HSSFCell cell = sheet.getRow(1).getCell(1);
> >  HSSFComment comment = patr.createComment(new HSSFClientAnchor(0, 0, 0,
> 0,
> > (short)1, 2, (short) 2, 4));
> >  comment.setString(new HSSFRichTextString("Comments Added"));
> >  cell.setCellComment(comment);
> >
> >  FileOutputStream fos = new FileOutputStream(new
> > File("D://temp//test.xls"));
> >  wb.write(fos);
> >  fos.close();
> >
> > Finally after writing the file to a new location, when i open the file
> and
> > see, the data in the drop down is lost and i am not getting the drop down
> > arrow also.
> >
> > Can you please help me on this.
> >
> > If you need any information, please let me know.
> >
> > --
> > with thanks,
> > krishnanand.
> >
>
>
>
> --
> Cordialement,
> Pierre Lavignotte
> Ingénieur Conception & Développement
> http://pierre.lavignotte.googlepages.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
with thanks,
krishnanand.

Reply via email to