IDEMPIERE-5696: Width of last column of reports exported as Xlsx is n… (#1806)
* IDEMPIERE-5696: Width of last column of reports exported as Xlsx is not correct https://idempiere.atlassian.net/browse/IDEMPIERE-5696 * IDEMPIERE-5696: Width of last column of reports exported as Xlsx is not correct - patch from hengsin Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com> --------- Co-authored-by: hengsin <152246+hengsin@users.noreply.github.com>
This commit is contained in:
parent
796ab2d95f
commit
254dcb3955
|
@ -321,9 +321,9 @@ public abstract class AbstractXLSXExporter
|
||||||
return cs_header;
|
return cs_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fixColumnWidth(XSSFSheet sheet, int lastColumnIndex)
|
private void fixColumnWidth(XSSFSheet sheet, int colCount)
|
||||||
{
|
{
|
||||||
for (short colnum = 0; colnum < lastColumnIndex; colnum++)
|
for (short colnum = 0; colnum < colCount; colnum++)
|
||||||
{
|
{
|
||||||
sheet.autoSizeColumn(colnum);
|
sheet.autoSizeColumn(colnum);
|
||||||
}
|
}
|
||||||
|
@ -489,8 +489,6 @@ public abstract class AbstractXLSXExporter
|
||||||
int colnum = 0;
|
int colnum = 0;
|
||||||
for (int col = 0; col < getColumnCount(); col++)
|
for (int col = 0; col < getColumnCount(); col++)
|
||||||
{
|
{
|
||||||
if (colnum > colnumMax)
|
|
||||||
colnumMax = colnum;
|
|
||||||
//
|
//
|
||||||
if (isColumnPrinted(col))
|
if (isColumnPrinted(col))
|
||||||
{
|
{
|
||||||
|
@ -589,6 +587,8 @@ public abstract class AbstractXLSXExporter
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
colnum++;
|
colnum++;
|
||||||
|
if (colnum > colnumMax)
|
||||||
|
colnumMax = colnum;
|
||||||
if (colSuppressRepeats != null)
|
if (colSuppressRepeats != null)
|
||||||
preValues[printColIndex] = obj;
|
preValues[printColIndex] = obj;
|
||||||
} // printed
|
} // printed
|
||||||
|
|
Loading…
Reference in New Issue