i use poi-3.8-20120326.jar
2012/10/17 Yegor Kozlov <yegor.kozlov@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
> <hansmaulwurfmail@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 <yegor.kozlov@dinom.ru>
> >
> >> can you narrow it down to a simple failing test case ?
> >>
> >> On Tue, Oct 16, 2012 at 5:42 PM, Hans Maulwurf
> >> <hansmaulwurfmail@gmail.com> wrote:
> >> > creating everything from scratch
> >> >
> >> >
> >> > 2012/10/16 Yegor Kozlov <yegor.kozlov@dinom.ru>
> >> >
> >> >> are creating a new workbook from scratch or modifying a template ?
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Oct 16, 2012 at 5:22 PM, Hans Maulwurf
> >> >> <hansmaulwurfmail@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
>
>
|