You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Hans Maulwurf <ha...@gmail.com> on 2012/10/16 15:22:28 UTC

setRepeatingRowsAndColumns in workbook with a few sheets

Hello,

I want to set setRepeatingRowsAndColumns for each sheet the same. I always
use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop) but
when opening the xls, a name conflict (DruckTitel) is shown?? where can I
set the name of the DruckTitel (i guess it's print area?) It's confusing
because this method doesn't ask for a name :(

thanks for your help & greetings,

Hans

Re: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
Thanks Frank,

you mean creating or opening the file on english/german windows? I use
german Lubuntu (with netbeans) to create and german winxp with excel 2003
to open.

2012/10/31 Frank Arbeiter <fr...@arbis.de>

> Hello Hans,
>
> I get the same error message, when I use repeatingRowsAndColumns.
> Maybe it helps to know, that it works fine on English Windows but failes on
> German Windows.
>
> regards
> Frank
>
>
>
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/setRepeatingRowsAndColumns-in-workbook-with-a-few-sheets-tp5711200p5711338.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Frank Arbeiter <fr...@arbis.de>.
Hello Hans,

I get the same error message, when I use repeatingRowsAndColumns.
Maybe it helps to know, that it works fine on English Windows but failes on
German Windows.

regards
Frank




--
View this message in context: http://apache-poi.1045710.n5.nabble.com/setRepeatingRowsAndColumns-in-workbook-with-a-few-sheets-tp5711200p5711338.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
@Yegor: Which imports did you use?
mine are:

import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.CellRangeAddress;


using  poi-3.9-beta1-20121024.jar now and nothing changed



2012/10/24 Hans Maulwurf <ha...@gmail.com>

> Now I got the latest src from trunk and built it with
> ant: poi-3.9-beta1-20121024.jar
> I replaced the old jar in my project with the new one, everything fine (I
> thought), HSSFSheet had some new methods setRepeatingRows and
> setRepeatingColumns.
>
> Now I use this code and get the same error when opening it with MS Excel
> 2003?? In German it says: "Namenskonflikt. Name darf integriertem Namen
> nicht gleichen. Alter Name: Drucktitel, Neuer Name: _______
> What's wrong? I looked the sources and I think there is something with the
> HSSFName in line 2175/2176 in HSSFSheet.java
> (java/org/apache/poi/hssf/usermodel)
>
>
>         HSSFWorkbook wb = new HSSFWorkbook();
>
>         HSSFSheet sheet1 = wb.createSheet("first");
>         HSSFSheet sheet2 = wb.createSheet("second");
>         HSSFSheet sheet3 = wb.createSheet("third");
>         HSSFSheet sheet4 = wb.createSheet("fourth");
>
>         HSSFRow row11 = sheet1.createRow(0);
>         HSSFRow row12 = sheet1.createRow(1);
>         HSSFRow row13 = sheet1.createRow(2);
>
>         HSSFRow row21 = sheet2.createRow(0);
>         HSSFRow row22 = sheet2.createRow(1);
>         HSSFRow row23 = sheet2.createRow(2);
>
>         HSSFRow row31 = sheet3.createRow(0);
>         HSSFRow row32 = sheet3.createRow(1);
>         HSSFRow row33 = sheet3.createRow(2);
>
>         HSSFRow row41 = sheet4.createRow(0);
>         HSSFRow row42 = sheet4.createRow(1);
>         HSSFRow row43 = sheet4.createRow(2);
>
>         row11.createCell(0).setCellValue("first1");
>         row11.createCell(1).setCellValue("first2");
>         row11.createCell(2).setCellValue("first3");
>         row12.createCell(0).setCellValue("body");
>         row12.createCell(1).setCellValue("body");
>         row12.createCell(2).setCellValue("body");
>         row13.createCell(0).setCellValue("body");
>         row13.createCell(1).setCellValue("body");
>         row13.createCell(2).setCellValue("body");
>
>         row21.createCell(0).setCellValue("head1");
>         row21.createCell(1).setCellValue("head2");
>         row21.createCell(2).setCellValue("head3");
>         row22.createCell(0).setCellValue("body_sec");
>         row22.createCell(1).setCellValue("body_sec");
>         row22.createCell(2).setCellValue("body_sec");
>         row23.createCell(0).setCellValue("body_sec");
>         row23.createCell(1).setCellValue("body_sec");
>         row23.createCell(2).setCellValue("body_sec");
>
>         row31.createCell(0).setCellValue("head1");
>         row31.createCell(1).setCellValue("head2");
>         row31.createCell(2).setCellValue("head3");
>         row32.createCell(0).setCellValue("body_thrd");
>         row32.createCell(1).setCellValue("body_thrd");
>         row32.createCell(2).setCellValue("body_thrd");
>         row33.createCell(0).setCellValue("body_thrd");
>         row33.createCell(1).setCellValue("body_thrd");
>         row33.createCell(2).setCellValue("body_thrd");
>
>         row31.createCell(0).setCellValue("head1");
>         row31.createCell(1).setCellValue("head2");
>         row31.createCell(2).setCellValue("head3");
>         row32.createCell(0).setCellValue("body_frth");
>         row32.createCell(1).setCellValue("body_frth");
>         row32.createCell(2).setCellValue("body_frth");
>         row33.createCell(0).setCellValue("body_frth");
>         row33.createCell(1).setCellValue("body_frth");
>         row33.createCell(2).setCellValue("body_frth");
>
>
>         /* old methods
>         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the bad
> line
>                                                         //if I remove this
> line, everything works fine
>                                                         //if it's there, I
> get a name conflict
>         */ now the new ones
>
>         CellRangeAddress reap = new CellRangeAddress(0, 1, -1, -1);
>         sheet1.setRepeatingRows(reap);
>         sheet2.setRepeatingRows(reap);
>         sheet3.setRepeatingRows(reap);
>         sheet4.setRepeatingRows(reap);
>
>         FileOutputStream fileOut = new
> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
>         wb.write(fileOut);
>         fileOut.close();
>
>
> 2012/10/19 Hans Maulwurf <ha...@gmail.com>
>
>> is this the latest build from trunk or where can i get it?
>>
>>
>> 2012/10/17 Hans Maulwurf <ha...@gmail.com>
>>
>>> i use poi-3.8-20120326.jar
>>>
>>>
>>> 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>>>
>>>> which version of POI are you using? Your code runs without errors with
>>>> the latest build from trunk.
>>>>
>>>>
>>>>
>>>> On Wed, Oct 17, 2012 at 3:28 PM, Hans Maulwurf
>>>> <ha...@gmail.com> wrote:
>>>> > Sure, maybe it's too simple to solve it by myself :P
>>>> >
>>>> > here is the test-code:
>>>> >
>>>> >         HSSFWorkbook wb = new HSSFWorkbook();
>>>> >
>>>> >         HSSFSheet sheet1 = wb.createSheet("first");
>>>> >         HSSFSheet sheet2 = wb.createSheet("second");
>>>> >         HSSFSheet sheet3 = wb.createSheet("third");
>>>> >         HSSFSheet sheet4 = wb.createSheet("fourth");
>>>> >
>>>> >         HSSFRow row11 = sheet1.createRow(0);
>>>> >         HSSFRow row12 = sheet1.createRow(1);
>>>> >         HSSFRow row13 = sheet1.createRow(2);
>>>> >
>>>> >         HSSFRow row21 = sheet2.createRow(0);
>>>> >         HSSFRow row22 = sheet2.createRow(1);
>>>> >         HSSFRow row23 = sheet2.createRow(2);
>>>> >
>>>> >         HSSFRow row31 = sheet3.createRow(0);
>>>> >         HSSFRow row32 = sheet3.createRow(1);
>>>> >         HSSFRow row33 = sheet3.createRow(2);
>>>> >
>>>> >         HSSFRow row41 = sheet4.createRow(0);
>>>> >         HSSFRow row42 = sheet4.createRow(1);
>>>> >         HSSFRow row43 = sheet4.createRow(2);
>>>> >
>>>> >         row11.createCell(0).setCellValue("first1");
>>>> >         row11.createCell(1).setCellValue("first2");
>>>> >         row11.createCell(2).setCellValue("first3");
>>>> >         row12.createCell(0).setCellValue("body");
>>>> >         row12.createCell(1).setCellValue("body");
>>>> >         row12.createCell(2).setCellValue("body");
>>>> >         row13.createCell(0).setCellValue("body");
>>>> >         row13.createCell(1).setCellValue("body");
>>>> >         row13.createCell(2).setCellValue("body");
>>>> >
>>>> >         row21.createCell(0).setCellValue("head1");
>>>> >         row21.createCell(1).setCellValue("head2");
>>>> >         row21.createCell(2).setCellValue("head3");
>>>> >         row22.createCell(0).setCellValue("body_sec");
>>>> >         row22.createCell(1).setCellValue("body_sec");
>>>> >         row22.createCell(2).setCellValue("body_sec");
>>>> >         row23.createCell(0).setCellValue("body_sec");
>>>> >         row23.createCell(1).setCellValue("body_sec");
>>>> >         row23.createCell(2).setCellValue("body_sec");
>>>> >
>>>> >         row31.createCell(0).setCellValue("head1");
>>>> >         row31.createCell(1).setCellValue("head2");
>>>> >         row31.createCell(2).setCellValue("head3");
>>>> >         row32.createCell(0).setCellValue("body_thrd");
>>>> >         row32.createCell(1).setCellValue("body_thrd");
>>>> >         row32.createCell(2).setCellValue("body_thrd");
>>>> >         row33.createCell(0).setCellValue("body_thrd");
>>>> >         row33.createCell(1).setCellValue("body_thrd");
>>>> >         row33.createCell(2).setCellValue("body_thrd");
>>>> >
>>>> >         row31.createCell(0).setCellValue("head1");
>>>> >         row31.createCell(1).setCellValue("head2");
>>>> >         row31.createCell(2).setCellValue("head3");
>>>> >         row32.createCell(0).setCellValue("body_frth");
>>>> >         row32.createCell(1).setCellValue("body_frth");
>>>> >         row32.createCell(2).setCellValue("body_frth");
>>>> >         row33.createCell(0).setCellValue("body_frth");
>>>> >         row33.createCell(1).setCellValue("body_frth");
>>>> >         row33.createCell(2).setCellValue("body_frth");
>>>> >
>>>> >
>>>> >         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
>>>> >
>>>> >         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
>>>> >
>>>> >         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
>>>> >
>>>> >         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the
>>>> bad
>>>> > line
>>>> >                                                         //if I remove
>>>> this
>>>> > line, everything works fine
>>>> >                                                         //if it's
>>>> there, I
>>>> > get a name conflict
>>>> >
>>>> >         FileOutputStream fileOut = new
>>>> >
>>>> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
>>>> >         wb.write(fileOut);
>>>> >         fileOut.close();
>>>> >
>>>> >
>>>> > Maybe you can workaround. Thanks for your help :)
>>>> >
>>>> >
>>>> >
>>>> > 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>>>> >
>>>> >> can you narrow it down to a simple failing test case ?
>>>> >>
>>>> >> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
>>>> >> <ha...@gmail.com> wrote:
>>>> >> > creating everything from scratch
>>>> >> >
>>>> >> >
>>>> >> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>>>> >> >
>>>> >> >> are creating a new workbook from scratch or modifying a template ?
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>>>> >> >> <ha...@gmail.com> wrote:
>>>> >> >> > Hello,
>>>> >> >> >
>>>> >> >> > I want to set setRepeatingRowsAndColumns for each sheet the
>>>> same. I
>>>> >> >> always
>>>> >> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in
>>>> a loop)
>>>> >> >> but
>>>> >> >> > when opening the xls, a name conflict (DruckTitel) is shown??
>>>> where
>>>> >> can I
>>>> >> >> > set the name of the DruckTitel (i guess it's print area?) It's
>>>> >> confusing
>>>> >> >> > because this method doesn't ask for a name :(
>>>> >> >> >
>>>> >> >> > thanks for your help & greetings,
>>>> >> >> >
>>>> >> >> > Hans
>>>> >> >>
>>>> >> >>
>>>> ---------------------------------------------------------------------
>>>> >> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
Now I got the latest src from trunk and built it with
ant: poi-3.9-beta1-20121024.jar
I replaced the old jar in my project with the new one, everything fine (I
thought), HSSFSheet had some new methods setRepeatingRows and
setRepeatingColumns.

Now I use this code and get the same error when opening it with MS Excel
2003?? In German it says: "Namenskonflikt. Name darf integriertem Namen
nicht gleichen. Alter Name: Drucktitel, Neuer Name: _______
What's wrong? I looked the sources and I think there is something with the
HSSFName in line 2175/2176 in HSSFSheet.java
(java/org/apache/poi/hssf/usermodel)


        HSSFWorkbook wb = new HSSFWorkbook();

        HSSFSheet sheet1 = wb.createSheet("first");
        HSSFSheet sheet2 = wb.createSheet("second");
        HSSFSheet sheet3 = wb.createSheet("third");
        HSSFSheet sheet4 = wb.createSheet("fourth");

        HSSFRow row11 = sheet1.createRow(0);
        HSSFRow row12 = sheet1.createRow(1);
        HSSFRow row13 = sheet1.createRow(2);

        HSSFRow row21 = sheet2.createRow(0);
        HSSFRow row22 = sheet2.createRow(1);
        HSSFRow row23 = sheet2.createRow(2);

        HSSFRow row31 = sheet3.createRow(0);
        HSSFRow row32 = sheet3.createRow(1);
        HSSFRow row33 = sheet3.createRow(2);

        HSSFRow row41 = sheet4.createRow(0);
        HSSFRow row42 = sheet4.createRow(1);
        HSSFRow row43 = sheet4.createRow(2);

        row11.createCell(0).setCellValue("first1");
        row11.createCell(1).setCellValue("first2");
        row11.createCell(2).setCellValue("first3");
        row12.createCell(0).setCellValue("body");
        row12.createCell(1).setCellValue("body");
        row12.createCell(2).setCellValue("body");
        row13.createCell(0).setCellValue("body");
        row13.createCell(1).setCellValue("body");
        row13.createCell(2).setCellValue("body");

        row21.createCell(0).setCellValue("head1");
        row21.createCell(1).setCellValue("head2");
        row21.createCell(2).setCellValue("head3");
        row22.createCell(0).setCellValue("body_sec");
        row22.createCell(1).setCellValue("body_sec");
        row22.createCell(2).setCellValue("body_sec");
        row23.createCell(0).setCellValue("body_sec");
        row23.createCell(1).setCellValue("body_sec");
        row23.createCell(2).setCellValue("body_sec");

        row31.createCell(0).setCellValue("head1");
        row31.createCell(1).setCellValue("head2");
        row31.createCell(2).setCellValue("head3");
        row32.createCell(0).setCellValue("body_thrd");
        row32.createCell(1).setCellValue("body_thrd");
        row32.createCell(2).setCellValue("body_thrd");
        row33.createCell(0).setCellValue("body_thrd");
        row33.createCell(1).setCellValue("body_thrd");
        row33.createCell(2).setCellValue("body_thrd");

        row31.createCell(0).setCellValue("head1");
        row31.createCell(1).setCellValue("head2");
        row31.createCell(2).setCellValue("head3");
        row32.createCell(0).setCellValue("body_frth");
        row32.createCell(1).setCellValue("body_frth");
        row32.createCell(2).setCellValue("body_frth");
        row33.createCell(0).setCellValue("body_frth");
        row33.createCell(1).setCellValue("body_frth");
        row33.createCell(2).setCellValue("body_frth");


        /* old methods
        wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the bad
line
                                                        //if I remove this
line, everything works fine
                                                        //if it's there, I
get a name conflict
        */ now the new ones

        CellRangeAddress reap = new CellRangeAddress(0, 1, -1, -1);
        sheet1.setRepeatingRows(reap);
        sheet2.setRepeatingRows(reap);
        sheet3.setRepeatingRows(reap);
        sheet4.setRepeatingRows(reap);

        FileOutputStream fileOut = new
FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
        wb.write(fileOut);
        fileOut.close();


2012/10/19 Hans Maulwurf <ha...@gmail.com>

> is this the latest build from trunk or where can i get it?
>
>
> 2012/10/17 Hans Maulwurf <ha...@gmail.com>
>
>> i use poi-3.8-20120326.jar
>>
>>
>> 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>>
>>> which version of POI are you using? Your code runs without errors with
>>> the latest build from trunk.
>>>
>>>
>>>
>>> On Wed, Oct 17, 2012 at 3:28 PM, Hans Maulwurf
>>> <ha...@gmail.com> wrote:
>>> > Sure, maybe it's too simple to solve it by myself :P
>>> >
>>> > here is the test-code:
>>> >
>>> >         HSSFWorkbook wb = new HSSFWorkbook();
>>> >
>>> >         HSSFSheet sheet1 = wb.createSheet("first");
>>> >         HSSFSheet sheet2 = wb.createSheet("second");
>>> >         HSSFSheet sheet3 = wb.createSheet("third");
>>> >         HSSFSheet sheet4 = wb.createSheet("fourth");
>>> >
>>> >         HSSFRow row11 = sheet1.createRow(0);
>>> >         HSSFRow row12 = sheet1.createRow(1);
>>> >         HSSFRow row13 = sheet1.createRow(2);
>>> >
>>> >         HSSFRow row21 = sheet2.createRow(0);
>>> >         HSSFRow row22 = sheet2.createRow(1);
>>> >         HSSFRow row23 = sheet2.createRow(2);
>>> >
>>> >         HSSFRow row31 = sheet3.createRow(0);
>>> >         HSSFRow row32 = sheet3.createRow(1);
>>> >         HSSFRow row33 = sheet3.createRow(2);
>>> >
>>> >         HSSFRow row41 = sheet4.createRow(0);
>>> >         HSSFRow row42 = sheet4.createRow(1);
>>> >         HSSFRow row43 = sheet4.createRow(2);
>>> >
>>> >         row11.createCell(0).setCellValue("first1");
>>> >         row11.createCell(1).setCellValue("first2");
>>> >         row11.createCell(2).setCellValue("first3");
>>> >         row12.createCell(0).setCellValue("body");
>>> >         row12.createCell(1).setCellValue("body");
>>> >         row12.createCell(2).setCellValue("body");
>>> >         row13.createCell(0).setCellValue("body");
>>> >         row13.createCell(1).setCellValue("body");
>>> >         row13.createCell(2).setCellValue("body");
>>> >
>>> >         row21.createCell(0).setCellValue("head1");
>>> >         row21.createCell(1).setCellValue("head2");
>>> >         row21.createCell(2).setCellValue("head3");
>>> >         row22.createCell(0).setCellValue("body_sec");
>>> >         row22.createCell(1).setCellValue("body_sec");
>>> >         row22.createCell(2).setCellValue("body_sec");
>>> >         row23.createCell(0).setCellValue("body_sec");
>>> >         row23.createCell(1).setCellValue("body_sec");
>>> >         row23.createCell(2).setCellValue("body_sec");
>>> >
>>> >         row31.createCell(0).setCellValue("head1");
>>> >         row31.createCell(1).setCellValue("head2");
>>> >         row31.createCell(2).setCellValue("head3");
>>> >         row32.createCell(0).setCellValue("body_thrd");
>>> >         row32.createCell(1).setCellValue("body_thrd");
>>> >         row32.createCell(2).setCellValue("body_thrd");
>>> >         row33.createCell(0).setCellValue("body_thrd");
>>> >         row33.createCell(1).setCellValue("body_thrd");
>>> >         row33.createCell(2).setCellValue("body_thrd");
>>> >
>>> >         row31.createCell(0).setCellValue("head1");
>>> >         row31.createCell(1).setCellValue("head2");
>>> >         row31.createCell(2).setCellValue("head3");
>>> >         row32.createCell(0).setCellValue("body_frth");
>>> >         row32.createCell(1).setCellValue("body_frth");
>>> >         row32.createCell(2).setCellValue("body_frth");
>>> >         row33.createCell(0).setCellValue("body_frth");
>>> >         row33.createCell(1).setCellValue("body_frth");
>>> >         row33.createCell(2).setCellValue("body_frth");
>>> >
>>> >
>>> >         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
>>> >
>>> >         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
>>> >
>>> >         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
>>> >
>>> >         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the
>>> bad
>>> > line
>>> >                                                         //if I remove
>>> this
>>> > line, everything works fine
>>> >                                                         //if it's
>>> there, I
>>> > get a name conflict
>>> >
>>> >         FileOutputStream fileOut = new
>>> >
>>> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
>>> >         wb.write(fileOut);
>>> >         fileOut.close();
>>> >
>>> >
>>> > Maybe you can workaround. Thanks for your help :)
>>> >
>>> >
>>> >
>>> > 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>>> >
>>> >> can you narrow it down to a simple failing test case ?
>>> >>
>>> >> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
>>> >> <ha...@gmail.com> wrote:
>>> >> > creating everything from scratch
>>> >> >
>>> >> >
>>> >> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>>> >> >
>>> >> >> are creating a new workbook from scratch or modifying a template ?
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>>> >> >> <ha...@gmail.com> wrote:
>>> >> >> > Hello,
>>> >> >> >
>>> >> >> > I want to set setRepeatingRowsAndColumns for each sheet the
>>> same. I
>>> >> >> always
>>> >> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a
>>> loop)
>>> >> >> but
>>> >> >> > when opening the xls, a name conflict (DruckTitel) is shown??
>>> where
>>> >> can I
>>> >> >> > set the name of the DruckTitel (i guess it's print area?) It's
>>> >> confusing
>>> >> >> > because this method doesn't ask for a name :(
>>> >> >> >
>>> >> >> > thanks for your help & greetings,
>>> >> >> >
>>> >> >> > Hans
>>> >> >>
>>> >> >>
>>> ---------------------------------------------------------------------
>>> >> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
is this the latest build from trunk or where can i get it?


2012/10/17 Hans Maulwurf <ha...@gmail.com>

> i use poi-3.8-20120326.jar
>
>
> 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>
>> which version of POI are you using? Your code runs without errors with
>> the latest build from trunk.
>>
>>
>>
>> On Wed, Oct 17, 2012 at 3:28 PM, Hans Maulwurf
>> <ha...@gmail.com> wrote:
>> > Sure, maybe it's too simple to solve it by myself :P
>> >
>> > here is the test-code:
>> >
>> >         HSSFWorkbook wb = new HSSFWorkbook();
>> >
>> >         HSSFSheet sheet1 = wb.createSheet("first");
>> >         HSSFSheet sheet2 = wb.createSheet("second");
>> >         HSSFSheet sheet3 = wb.createSheet("third");
>> >         HSSFSheet sheet4 = wb.createSheet("fourth");
>> >
>> >         HSSFRow row11 = sheet1.createRow(0);
>> >         HSSFRow row12 = sheet1.createRow(1);
>> >         HSSFRow row13 = sheet1.createRow(2);
>> >
>> >         HSSFRow row21 = sheet2.createRow(0);
>> >         HSSFRow row22 = sheet2.createRow(1);
>> >         HSSFRow row23 = sheet2.createRow(2);
>> >
>> >         HSSFRow row31 = sheet3.createRow(0);
>> >         HSSFRow row32 = sheet3.createRow(1);
>> >         HSSFRow row33 = sheet3.createRow(2);
>> >
>> >         HSSFRow row41 = sheet4.createRow(0);
>> >         HSSFRow row42 = sheet4.createRow(1);
>> >         HSSFRow row43 = sheet4.createRow(2);
>> >
>> >         row11.createCell(0).setCellValue("first1");
>> >         row11.createCell(1).setCellValue("first2");
>> >         row11.createCell(2).setCellValue("first3");
>> >         row12.createCell(0).setCellValue("body");
>> >         row12.createCell(1).setCellValue("body");
>> >         row12.createCell(2).setCellValue("body");
>> >         row13.createCell(0).setCellValue("body");
>> >         row13.createCell(1).setCellValue("body");
>> >         row13.createCell(2).setCellValue("body");
>> >
>> >         row21.createCell(0).setCellValue("head1");
>> >         row21.createCell(1).setCellValue("head2");
>> >         row21.createCell(2).setCellValue("head3");
>> >         row22.createCell(0).setCellValue("body_sec");
>> >         row22.createCell(1).setCellValue("body_sec");
>> >         row22.createCell(2).setCellValue("body_sec");
>> >         row23.createCell(0).setCellValue("body_sec");
>> >         row23.createCell(1).setCellValue("body_sec");
>> >         row23.createCell(2).setCellValue("body_sec");
>> >
>> >         row31.createCell(0).setCellValue("head1");
>> >         row31.createCell(1).setCellValue("head2");
>> >         row31.createCell(2).setCellValue("head3");
>> >         row32.createCell(0).setCellValue("body_thrd");
>> >         row32.createCell(1).setCellValue("body_thrd");
>> >         row32.createCell(2).setCellValue("body_thrd");
>> >         row33.createCell(0).setCellValue("body_thrd");
>> >         row33.createCell(1).setCellValue("body_thrd");
>> >         row33.createCell(2).setCellValue("body_thrd");
>> >
>> >         row31.createCell(0).setCellValue("head1");
>> >         row31.createCell(1).setCellValue("head2");
>> >         row31.createCell(2).setCellValue("head3");
>> >         row32.createCell(0).setCellValue("body_frth");
>> >         row32.createCell(1).setCellValue("body_frth");
>> >         row32.createCell(2).setCellValue("body_frth");
>> >         row33.createCell(0).setCellValue("body_frth");
>> >         row33.createCell(1).setCellValue("body_frth");
>> >         row33.createCell(2).setCellValue("body_frth");
>> >
>> >
>> >         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
>> >
>> >         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
>> >
>> >         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
>> >
>> >         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the
>> bad
>> > line
>> >                                                         //if I remove
>> this
>> > line, everything works fine
>> >                                                         //if it's
>> there, I
>> > get a name conflict
>> >
>> >         FileOutputStream fileOut = new
>> >
>> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
>> >         wb.write(fileOut);
>> >         fileOut.close();
>> >
>> >
>> > Maybe you can workaround. Thanks for your help :)
>> >
>> >
>> >
>> > 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>> >
>> >> can you narrow it down to a simple failing test case ?
>> >>
>> >> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
>> >> <ha...@gmail.com> wrote:
>> >> > creating everything from scratch
>> >> >
>> >> >
>> >> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>> >> >
>> >> >> are creating a new workbook from scratch or modifying a template ?
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>> >> >> <ha...@gmail.com> wrote:
>> >> >> > Hello,
>> >> >> >
>> >> >> > I want to set setRepeatingRowsAndColumns for each sheet the same.
>> I
>> >> >> always
>> >> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a
>> loop)
>> >> >> but
>> >> >> > when opening the xls, a name conflict (DruckTitel) is shown??
>> where
>> >> can I
>> >> >> > set the name of the DruckTitel (i guess it's print area?) It's
>> >> confusing
>> >> >> > because this method doesn't ask for a name :(
>> >> >> >
>> >> >> > thanks for your help & greetings,
>> >> >> >
>> >> >> > Hans
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
i use poi-3.8-20120326.jar


2012/10/17 Yegor Kozlov <ye...@dinom.ru>

> which version of POI are you using? Your code runs without errors with
> the latest build from trunk.
>
>
>
> On Wed, Oct 17, 2012 at 3:28 PM, Hans Maulwurf
> <ha...@gmail.com> wrote:
> > Sure, maybe it's too simple to solve it by myself :P
> >
> > here is the test-code:
> >
> >         HSSFWorkbook wb = new HSSFWorkbook();
> >
> >         HSSFSheet sheet1 = wb.createSheet("first");
> >         HSSFSheet sheet2 = wb.createSheet("second");
> >         HSSFSheet sheet3 = wb.createSheet("third");
> >         HSSFSheet sheet4 = wb.createSheet("fourth");
> >
> >         HSSFRow row11 = sheet1.createRow(0);
> >         HSSFRow row12 = sheet1.createRow(1);
> >         HSSFRow row13 = sheet1.createRow(2);
> >
> >         HSSFRow row21 = sheet2.createRow(0);
> >         HSSFRow row22 = sheet2.createRow(1);
> >         HSSFRow row23 = sheet2.createRow(2);
> >
> >         HSSFRow row31 = sheet3.createRow(0);
> >         HSSFRow row32 = sheet3.createRow(1);
> >         HSSFRow row33 = sheet3.createRow(2);
> >
> >         HSSFRow row41 = sheet4.createRow(0);
> >         HSSFRow row42 = sheet4.createRow(1);
> >         HSSFRow row43 = sheet4.createRow(2);
> >
> >         row11.createCell(0).setCellValue("first1");
> >         row11.createCell(1).setCellValue("first2");
> >         row11.createCell(2).setCellValue("first3");
> >         row12.createCell(0).setCellValue("body");
> >         row12.createCell(1).setCellValue("body");
> >         row12.createCell(2).setCellValue("body");
> >         row13.createCell(0).setCellValue("body");
> >         row13.createCell(1).setCellValue("body");
> >         row13.createCell(2).setCellValue("body");
> >
> >         row21.createCell(0).setCellValue("head1");
> >         row21.createCell(1).setCellValue("head2");
> >         row21.createCell(2).setCellValue("head3");
> >         row22.createCell(0).setCellValue("body_sec");
> >         row22.createCell(1).setCellValue("body_sec");
> >         row22.createCell(2).setCellValue("body_sec");
> >         row23.createCell(0).setCellValue("body_sec");
> >         row23.createCell(1).setCellValue("body_sec");
> >         row23.createCell(2).setCellValue("body_sec");
> >
> >         row31.createCell(0).setCellValue("head1");
> >         row31.createCell(1).setCellValue("head2");
> >         row31.createCell(2).setCellValue("head3");
> >         row32.createCell(0).setCellValue("body_thrd");
> >         row32.createCell(1).setCellValue("body_thrd");
> >         row32.createCell(2).setCellValue("body_thrd");
> >         row33.createCell(0).setCellValue("body_thrd");
> >         row33.createCell(1).setCellValue("body_thrd");
> >         row33.createCell(2).setCellValue("body_thrd");
> >
> >         row31.createCell(0).setCellValue("head1");
> >         row31.createCell(1).setCellValue("head2");
> >         row31.createCell(2).setCellValue("head3");
> >         row32.createCell(0).setCellValue("body_frth");
> >         row32.createCell(1).setCellValue("body_frth");
> >         row32.createCell(2).setCellValue("body_frth");
> >         row33.createCell(0).setCellValue("body_frth");
> >         row33.createCell(1).setCellValue("body_frth");
> >         row33.createCell(2).setCellValue("body_frth");
> >
> >
> >         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
> >
> >         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
> >
> >         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
> >
> >         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the bad
> > line
> >                                                         //if I remove
> this
> > line, everything works fine
> >                                                         //if it's there,
> I
> > get a name conflict
> >
> >         FileOutputStream fileOut = new
> >
> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
> >         wb.write(fileOut);
> >         fileOut.close();
> >
> >
> > Maybe you can workaround. Thanks for your help :)
> >
> >
> >
> > 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
> >
> >> can you narrow it down to a simple failing test case ?
> >>
> >> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
> >> <ha...@gmail.com> wrote:
> >> > creating everything from scratch
> >> >
> >> >
> >> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
> >> >
> >> >> are creating a new workbook from scratch or modifying a template ?
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
> >> >> <ha...@gmail.com> wrote:
> >> >> > Hello,
> >> >> >
> >> >> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
> >> >> always
> >> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a
> loop)
> >> >> but
> >> >> > when opening the xls, a name conflict (DruckTitel) is shown?? where
> >> can I
> >> >> > set the name of the DruckTitel (i guess it's print area?) It's
> >> confusing
> >> >> > because this method doesn't ask for a name :(
> >> >> >
> >> >> > thanks for your help & greetings,
> >> >> >
> >> >> > Hans
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Yegor Kozlov <ye...@dinom.ru>.
which version of POI are you using? Your code runs without errors with
the latest build from trunk.



On Wed, Oct 17, 2012 at 3:28 PM, Hans Maulwurf
<ha...@gmail.com> wrote:
> Sure, maybe it's too simple to solve it by myself :P
>
> here is the test-code:
>
>         HSSFWorkbook wb = new HSSFWorkbook();
>
>         HSSFSheet sheet1 = wb.createSheet("first");
>         HSSFSheet sheet2 = wb.createSheet("second");
>         HSSFSheet sheet3 = wb.createSheet("third");
>         HSSFSheet sheet4 = wb.createSheet("fourth");
>
>         HSSFRow row11 = sheet1.createRow(0);
>         HSSFRow row12 = sheet1.createRow(1);
>         HSSFRow row13 = sheet1.createRow(2);
>
>         HSSFRow row21 = sheet2.createRow(0);
>         HSSFRow row22 = sheet2.createRow(1);
>         HSSFRow row23 = sheet2.createRow(2);
>
>         HSSFRow row31 = sheet3.createRow(0);
>         HSSFRow row32 = sheet3.createRow(1);
>         HSSFRow row33 = sheet3.createRow(2);
>
>         HSSFRow row41 = sheet4.createRow(0);
>         HSSFRow row42 = sheet4.createRow(1);
>         HSSFRow row43 = sheet4.createRow(2);
>
>         row11.createCell(0).setCellValue("first1");
>         row11.createCell(1).setCellValue("first2");
>         row11.createCell(2).setCellValue("first3");
>         row12.createCell(0).setCellValue("body");
>         row12.createCell(1).setCellValue("body");
>         row12.createCell(2).setCellValue("body");
>         row13.createCell(0).setCellValue("body");
>         row13.createCell(1).setCellValue("body");
>         row13.createCell(2).setCellValue("body");
>
>         row21.createCell(0).setCellValue("head1");
>         row21.createCell(1).setCellValue("head2");
>         row21.createCell(2).setCellValue("head3");
>         row22.createCell(0).setCellValue("body_sec");
>         row22.createCell(1).setCellValue("body_sec");
>         row22.createCell(2).setCellValue("body_sec");
>         row23.createCell(0).setCellValue("body_sec");
>         row23.createCell(1).setCellValue("body_sec");
>         row23.createCell(2).setCellValue("body_sec");
>
>         row31.createCell(0).setCellValue("head1");
>         row31.createCell(1).setCellValue("head2");
>         row31.createCell(2).setCellValue("head3");
>         row32.createCell(0).setCellValue("body_thrd");
>         row32.createCell(1).setCellValue("body_thrd");
>         row32.createCell(2).setCellValue("body_thrd");
>         row33.createCell(0).setCellValue("body_thrd");
>         row33.createCell(1).setCellValue("body_thrd");
>         row33.createCell(2).setCellValue("body_thrd");
>
>         row31.createCell(0).setCellValue("head1");
>         row31.createCell(1).setCellValue("head2");
>         row31.createCell(2).setCellValue("head3");
>         row32.createCell(0).setCellValue("body_frth");
>         row32.createCell(1).setCellValue("body_frth");
>         row32.createCell(2).setCellValue("body_frth");
>         row33.createCell(0).setCellValue("body_frth");
>         row33.createCell(1).setCellValue("body_frth");
>         row33.createCell(2).setCellValue("body_frth");
>
>
>         wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);
>
>         wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the bad
> line
>                                                         //if I remove this
> line, everything works fine
>                                                         //if it's there, I
> get a name conflict
>
>         FileOutputStream fileOut = new
> FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
>         wb.write(fileOut);
>         fileOut.close();
>
>
> Maybe you can workaround. Thanks for your help :)
>
>
>
> 2012/10/17 Yegor Kozlov <ye...@dinom.ru>
>
>> can you narrow it down to a simple failing test case ?
>>
>> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
>> <ha...@gmail.com> wrote:
>> > creating everything from scratch
>> >
>> >
>> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>> >
>> >> are creating a new workbook from scratch or modifying a template ?
>> >>
>> >>
>> >>
>> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>> >> <ha...@gmail.com> wrote:
>> >> > Hello,
>> >> >
>> >> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
>> >> always
>> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop)
>> >> but
>> >> > when opening the xls, a name conflict (DruckTitel) is shown?? where
>> can I
>> >> > set the name of the DruckTitel (i guess it's print area?) It's
>> confusing
>> >> > because this method doesn't ask for a name :(
>> >> >
>> >> > thanks for your help & greetings,
>> >> >
>> >> > Hans
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
Sure, maybe it's too simple to solve it by myself :P

here is the test-code:

        HSSFWorkbook wb = new HSSFWorkbook();

        HSSFSheet sheet1 = wb.createSheet("first");
        HSSFSheet sheet2 = wb.createSheet("second");
        HSSFSheet sheet3 = wb.createSheet("third");
        HSSFSheet sheet4 = wb.createSheet("fourth");

        HSSFRow row11 = sheet1.createRow(0);
        HSSFRow row12 = sheet1.createRow(1);
        HSSFRow row13 = sheet1.createRow(2);

        HSSFRow row21 = sheet2.createRow(0);
        HSSFRow row22 = sheet2.createRow(1);
        HSSFRow row23 = sheet2.createRow(2);

        HSSFRow row31 = sheet3.createRow(0);
        HSSFRow row32 = sheet3.createRow(1);
        HSSFRow row33 = sheet3.createRow(2);

        HSSFRow row41 = sheet4.createRow(0);
        HSSFRow row42 = sheet4.createRow(1);
        HSSFRow row43 = sheet4.createRow(2);

        row11.createCell(0).setCellValue("first1");
        row11.createCell(1).setCellValue("first2");
        row11.createCell(2).setCellValue("first3");
        row12.createCell(0).setCellValue("body");
        row12.createCell(1).setCellValue("body");
        row12.createCell(2).setCellValue("body");
        row13.createCell(0).setCellValue("body");
        row13.createCell(1).setCellValue("body");
        row13.createCell(2).setCellValue("body");

        row21.createCell(0).setCellValue("head1");
        row21.createCell(1).setCellValue("head2");
        row21.createCell(2).setCellValue("head3");
        row22.createCell(0).setCellValue("body_sec");
        row22.createCell(1).setCellValue("body_sec");
        row22.createCell(2).setCellValue("body_sec");
        row23.createCell(0).setCellValue("body_sec");
        row23.createCell(1).setCellValue("body_sec");
        row23.createCell(2).setCellValue("body_sec");

        row31.createCell(0).setCellValue("head1");
        row31.createCell(1).setCellValue("head2");
        row31.createCell(2).setCellValue("head3");
        row32.createCell(0).setCellValue("body_thrd");
        row32.createCell(1).setCellValue("body_thrd");
        row32.createCell(2).setCellValue("body_thrd");
        row33.createCell(0).setCellValue("body_thrd");
        row33.createCell(1).setCellValue("body_thrd");
        row33.createCell(2).setCellValue("body_thrd");

        row31.createCell(0).setCellValue("head1");
        row31.createCell(1).setCellValue("head2");
        row31.createCell(2).setCellValue("head3");
        row32.createCell(0).setCellValue("body_frth");
        row32.createCell(1).setCellValue("body_frth");
        row32.createCell(2).setCellValue("body_frth");
        row33.createCell(0).setCellValue("body_frth");
        row33.createCell(1).setCellValue("body_frth");
        row33.createCell(2).setCellValue("body_frth");


        wb.setRepeatingRowsAndColumns(0, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(1, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(2, -1, -1, 0, 0);

        wb.setRepeatingRowsAndColumns(3, -1, -1, 0, 0); //this is the bad
line
                                                        //if I remove this
line, everything works fine
                                                        //if it's there, I
get a name conflict

        FileOutputStream fileOut = new
FileOutputStream("/home/muench/Arbeitsfläche/transfers/Test_RepeatingRowsAndColumns.xls");
        wb.write(fileOut);
        fileOut.close();


Maybe you can workaround. Thanks for your help :)



2012/10/17 Yegor Kozlov <ye...@dinom.ru>

> can you narrow it down to a simple failing test case ?
>
> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
> <ha...@gmail.com> wrote:
> > creating everything from scratch
> >
> >
> > 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
> >
> >> are creating a new workbook from scratch or modifying a template ?
> >>
> >>
> >>
> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
> >> <ha...@gmail.com> wrote:
> >> > Hello,
> >> >
> >> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
> >> always
> >> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop)
> >> but
> >> > when opening the xls, a name conflict (DruckTitel) is shown?? where
> can I
> >> > set the name of the DruckTitel (i guess it's print area?) It's
> confusing
> >> > because this method doesn't ask for a name :(
> >> >
> >> > thanks for your help & greetings,
> >> >
> >> > Hans
> >>
> >> ---------------------------------------------------------------------
> >> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Yegor Kozlov <ye...@dinom.ru>.
can you narrow it down to a simple failing test case ?

On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
<ha...@gmail.com> wrote:
> creating everything from scratch
>
>
> 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>
>> are creating a new workbook from scratch or modifying a template ?
>>
>>
>>
>> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>> <ha...@gmail.com> wrote:
>> > Hello,
>> >
>> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
>> always
>> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop)
>> but
>> > when opening the xls, a name conflict (DruckTitel) is shown?? where can I
>> > set the name of the DruckTitel (i guess it's print area?) It's confusing
>> > because this method doesn't ask for a name :(
>> >
>> > thanks for your help & greetings,
>> >
>> > Hans
>>
>> ---------------------------------------------------------------------
>> 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: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
A few more details. The first sheet (especially the first row) is different
from the other sheets. Second and all following sheets have the same first
row. When I set the first row to repeat at the printpage to the first
(which is different) and the second sheet, everything works fine. But when
I set it to the first 3 sheets, the conflict-name-error is showing up when
opening the xls. I don't know why :/



2012/10/16 Hans Maulwurf <ha...@gmail.com>

> creating everything from scratch
>
>
> 2012/10/16 Yegor Kozlov <ye...@dinom.ru>
>
>> are creating a new workbook from scratch or modifying a template ?
>>
>>
>>
>> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
>> <ha...@gmail.com> wrote:
>> > Hello,
>> >
>> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
>> always
>> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop)
>> but
>> > when opening the xls, a name conflict (DruckTitel) is shown?? where can
>> I
>> > set the name of the DruckTitel (i guess it's print area?) It's confusing
>> > because this method doesn't ask for a name :(
>> >
>> > thanks for your help & greetings,
>> >
>> > Hans
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>>
>

Re: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Hans Maulwurf <ha...@gmail.com>.
creating everything from scratch


2012/10/16 Yegor Kozlov <ye...@dinom.ru>

> are creating a new workbook from scratch or modifying a template ?
>
>
>
> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
> <ha...@gmail.com> wrote:
> > Hello,
> >
> > I want to set setRepeatingRowsAndColumns for each sheet the same. I
> always
> > use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop)
> but
> > when opening the xls, a name conflict (DruckTitel) is shown?? where can I
> > set the name of the DruckTitel (i guess it's print area?) It's confusing
> > because this method doesn't ask for a name :(
> >
> > thanks for your help & greetings,
> >
> > Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: setRepeatingRowsAndColumns in workbook with a few sheets

Posted by Yegor Kozlov <ye...@dinom.ru>.
are creating a new workbook from scratch or modifying a template ?



On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
<ha...@gmail.com> wrote:
> Hello,
>
> I want to set setRepeatingRowsAndColumns for each sheet the same. I always
> use setRepeatingRowsAndColumns(i, -1, -1, 0, 0) (counting i in a loop) but
> when opening the xls, a name conflict (DruckTitel) is shown?? where can I
> set the name of the DruckTitel (i guess it's print area?) It's confusing
> because this method doesn't ask for a name :(
>
> thanks for your help & greetings,
>
> Hans

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