https://bz.apache.org/bugzilla/show_bug.cgi?id=63221
Bug ID: 63221 Summary: Please methods getTopMargin(), getBottomMargin(), etc, to XSSFSheet Product: POI Version: 4.0.x-dev Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: dmgau...@uab.edu Target Milestone: --- The XSSFPrintSetup class contains the methods getHeaderMargin() and getFooterMargin(). However, Excel documents also contain top, bottom, left, and right margin settings, so the methods getTopMargin(), getBottomMargin(), etc, should be added. It would also be useful to add these as methods of XSSFSheet. The code fragments below can be used as a template. class XSSFPrintSetup { public double getTopMargin() { return pageMargins.getTop(); } } class XSSFSheet { public double getTopMargin() { final CTPageMargins pageMargins; if(worksheet.isSetPageMargins()) { pageMargins = ctWorksheet.getPageMargins(); } else { pageMargins = ctWorksheet.addNewPageMargins(); } return pageMargins.getTop(); } } This is based on the following workaround: public static double getTopMargin(XSSFSheet sheet) { final CTWorksheet ctSheet = sheet.getCTWorksheet(); final CTPageMargins margins = ctSheet.getPageMargins(); return margins.getTop(); } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org