Parts-in-Place / Vaadin_TableExport

Automatically exported from code.google.com/p/tableexport-for-vaadin
0 stars 0 forks source link

use table cell alignment for excel cell alignment #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
from http://vaadin.com/forum/-/message_boards/view_message/579716

Original issue reported on code.google.com by jnas...@gmail.com on 8 Sep 2011 at 6:06

GoogleCodeExporter commented 8 years ago
This was relatively easy to implement.  Added the following to addDataRow in 
ExcelExport:

            vaadinAlignment = this.table.getColumnAlignment(propId);
            if (Table.ALIGN_LEFT == vaadinAlignment) {
                sheetCell.getCellStyle().setAlignment(CellStyle.ALIGN_LEFT);
            } else if (Table.ALIGN_RIGHT == vaadinAlignment) {
                sheetCell.getCellStyle().setAlignment(CellStyle.ALIGN_RIGHT);
            } else {
                sheetCell.getCellStyle().setAlignment(CellStyle.ALIGN_CENTER);
            }

Original comment by jnas...@gmail.com on 8 Sep 2011 at 7:47