You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2018/08/23 16:26:41 UTC
[Bug 62651] New: setting setDisplayGridlines(false) on the first
sheet causes all sheets to hide their gridlines
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
Bug ID: 62651
Summary: setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Product: POI
Version: 3.17-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: SXSSF
Assignee: dev@poi.apache.org
Reporter: diarmuidkeane@gmail.com
Target Milestone: ---
In a SXSSFWorkbook with multiple SXSSFSheet :
Action : calling sxssfSheet.setDisplayGridlines(false) on 2nd or subsequent
sheets in workbook
Expectation : only those sheets set as above should have their gridlines
hidden
Result: Behaves as Expected
Action : calling sxssfSheet.setDisplayGridlines(false) only on 1st sheet in
workbook
Expectation : only 1st sheet should have it's gridlines hidden
Result: Does not behave as expected . All sheets in workbook have their
gridlines hidden
Summary
calling sxssfSheet.setDisplayGridlines(false) behaves as expected if sxssfSheet
is not the first sheet in the workbook
Otherwise all sheets' gridlines will be hidden
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
--- Comment #5 from diarmuid <di...@gmail.com> ---
(In reply to Dominik Stadler from comment #4)
> I tried this with only LibreOffice (no POI) and had the same effect, so I
> fear this might be actually a bug in LibreOffice instead.
>
> Please try this with Microsoft Excel and report if the files created by
> Apache POI are still not displayed correctly there as well.
Hi thanks for checking this
I also have verifed that
a) The issue does not manifest itself with Microsoft Excel
b) Carrying out these operations only in LibreOffice ( not using POI api )
reproduces the issue .
In light of this I think the bug may be closed and a bug opened with
LibreOffice
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
--- Comment #1 from diarmuid <di...@gmail.com> ---
Here's a Gist to reproduce the issue - resulting files attached
package go.figure;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
public class PoiBug62651 {
public static void caseWithExpectedBehaviour(){
try (SXSSFWorkbook wb = new SXSSFWorkbook(1)) {
wb.setCompressTempFiles(true);
wb.createSheet("1st").setDisplayGridlines(true);
wb.createSheet("2nd").setDisplayGridlines(false);
wb.createSheet("3rd").setDisplayGridlines(true);
wb.createSheet("4th").setDisplayGridlines(false);
wb.createSheet("5th").setDisplayGridlines(true);
try (FileOutputStream out = new
FileOutputStream("PoiBug62651-" + "correct-behaviour-selected-sheets-hidden" +
".xlsx")) {
wb.write(out);
} finally {
wb.dispose();
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void caseWithUnexpectedBehaviour(){
try (SXSSFWorkbook wb = new SXSSFWorkbook(1)) {
wb.setCompressTempFiles(true);
wb.createSheet("1st").setDisplayGridlines(false);
wb.createSheet("2nd").setDisplayGridlines(false);
wb.createSheet("3rd").setDisplayGridlines(true);
wb.createSheet("4th").setDisplayGridlines(false);
wb.createSheet("5th").setDisplayGridlines(true);
try (FileOutputStream out = new
FileOutputStream("PoiBug62651-" + "all-5-sheets-incorrectly-hide-grids" +
".xlsx")) {
wb.write(out);
} finally {
wb.dispose();
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
caseWithExpectedBehaviour();
caseWithUnexpectedBehaviour();
}
}
jdk version information :-
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
--- Comment #2 from diarmuid <di...@gmail.com> ---
Created attachment 36109
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36109&action=edit
output of gist reproducing case with unexpected behaviour
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #4 from Dominik Stadler <do...@gmx.at> ---
I tried this with only LibreOffice (no POI) and had the same effect, so I fear
this might be actually a bug in LibreOffice instead.
Please try this with Microsoft Excel and report if the files created by Apache
POI are still not displayed correctly there as well.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
--- Comment #3 from diarmuid <di...@gmail.com> ---
Created attachment 36110
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36110&action=edit
output of gist reproducing case with expected behaviour
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62651] setting setDisplayGridlines(false) on the first sheet
causes all sheets to hide their gridlines
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62651
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
Ok, thanks for the note, closing this bug then.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org