use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class LectureBlockExport method addHeaders_2.
private void addHeaders_2(OpenXMLWorksheet exportSheet) {
Row headerRow = exportSheet.newRow();
int pos = 0;
if (isAdministrativeUser) {
pos++;
}
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null)
continue;
pos++;
}
headerRow.addCell(pos++, translator.translate("export.header.lectures"));
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class LectureBlockExport method addFooter.
private void addFooter(OpenXMLWorksheet exportSheet) {
exportSheet.newRow();
exportSheet.newRow();
Row footerRow = exportSheet.newRow();
int pos = 0;
if (isAdministrativeUser) {
pos++;
}
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null)
continue;
pos++;
}
footerRow.addCell(pos, translator.translate("export.footer.lectures.hint"));
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class LectureBlockExport method addHeaders_3.
private void addHeaders_3(OpenXMLWorksheet exportSheet) {
Row headerRow = exportSheet.newRow();
int pos = 0;
if (isAdministrativeUser) {
headerRow.addCell(pos++, translator.translate("table.header.username"));
}
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null)
continue;
String propName = userPropertyHandler.getName();
headerRow.addCell(pos++, translator.translate("form.name." + propName));
}
for (int i = 0; i < lectureBlock.getPlannedLecturesNumber(); i++) {
headerRow.addCell(pos++, Integer.toString(i + 1));
}
if (authorizedAbsenceEnabled) {
// authorized absence
headerRow.addCell(pos++, translator.translate("table.header.authorized.absence"));
// authorized absence reason
headerRow.addCell(pos++, translator.translate("authorized.absence.reason"));
}
// comment
headerRow.addCell(pos++, translator.translate("table.header.comment"));
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class LecturesStatisticsExport method addHeadersDetailled.
private void addHeadersDetailled(OpenXMLWorksheet exportSheet) {
Row headerRow = exportSheet.newRow();
int pos = 0;
pos = addHeadersUser(headerRow, pos);
headerRow.addCell(pos++, translator.translate("table.header.external.ref"));
headerRow.addCell(pos++, translator.translate("table.header.entry"));
addHeadersStatistics(headerRow, pos);
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class XlsFlexiTableExporter method createData.
protected void createData(FlexiTableComponent ftC, List<FlexiColumnModel> columns, Translator translator, OpenXMLWorksheet sheet, OpenXMLWorkbook workbook) {
FlexiTableDataModel<?> dataModel = ftC.getFlexiTableElement().getTableDataModel();
int numOfRow = dataModel.getRowCount();
int numOfColumns = columns.size();
for (int r = 0; r < numOfRow; r++) {
Row dataRow = sheet.newRow();
for (int c = 0; c < numOfColumns; c++) {
FlexiColumnModel cd = columns.get(c);
createCell(ftC, cd, dataRow, r, c, translator, workbook);
}
}
}
Aggregations