sheet.showInPane((short)0, (short)0);
Now is working...
Haha.
Thanks.

Regards,
Mead


On Fri, Mar 30, 2012 at 2:49 PM, Mead Lai <[email protected]> wrote:

> Thank you Mark.
>
> Following is my code, but it doesn't work at all.
> Is there some problem?
> ==================
> ==================
>
> HSSFCell cc = sourceRow.getCell(0);
> if(cc ==null){
> cc = sourceRow.createCell(0);
> }
> cc.setCellValue("");
> cc.setAsActiveCell();
> sheet.setColumnWidth(0, 3500);
> fos = new FileOutputStream(path + "/update.xls");
> wbCreat.write(fos);
>
> Regards,
> Mead
>
>
>
> On Fri, Mar 30, 2012 at 2:31 PM, Mark Beardsley 
> <[email protected]>wrote:
>
>> The first thing that springs to mind is the setAsActiveCell() method
>> defined
>> for both XSSFCell and HSSFCell. Once you have built the worksheet, get a
>> reference for cell A1 and call the setAsActiveCell() method on that before
>> you save the file away; it might even be possible to call this method at
>> the
>> start of the process, as you are building the worksheet and creating cell
>> A1
>> (assuming that is top, left hand most cell that users can populate on the
>> sheet).
>>
>> --
>> View this message in context:
>> http://apache-poi.1045710.n5.nabble.com/how-to-set-to-first-column-and-first-row-active-tp5605774p5605803.html
>> Sent from the POI - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to