Thanks for your reply. Indeed, the name and reference need to be set.
In addition, it seems the sheet name must be set in the reference
because
name.setRefersToFormula("$E$11");
will create a file that Excel Viewer (with which I am testing my
output) won't open.
On Sat, Dec 13, 2008 at 4:30 AM, Yegor Kozlov <[email protected]> wrote:
>> If I take the "New, generic SS Usermodel Code" at
>> http://poi.apache.org/spreadsheet/converting.html and add to it the
>> following section:
>>
>> wb.createName();
>>
>> right after
>>
>> Workbook wb = wbs[i];
>>
>> then the output workbook.xlsx cannot be opened by Excel.
>>
>> Am I doing something wrong with the name?
>
> When creating names, you are supposed to set the name name and the
> reference:
> Name name = wb.createName();
> //the following two lines are required:
> name.setNameName("unique_id");
> name.setRefersToFormula("'Sheet1'!$E$11");
>
> Yegor
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]