Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBW importer incorrectly targets a fixed sheet number #378

Closed
tinne opened this issue Nov 5, 2019 · 0 comments
Closed

UBW importer incorrectly targets a fixed sheet number #378

tinne opened this issue Nov 5, 2019 · 0 comments
Assignees

Comments

@tinne
Copy link
Member

tinne commented Nov 5, 2019

In order to correctly import UBW work records, the importer needs to target a sheet with a fixed name (“Aufwände gesamt”) instead of targeting sheet number 2 ignorant of any edits that may have happened to the sheet template in its generation.

Here is a patch to get the idea (untested and obviously not production-ready):

Index: budgeteer-ubw-importer/src/main/java/org/wickedsource/budgeteer/importer/ubw/UBWWorkRecordsImporter.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- budgeteer-ubw-importer/src/main/java/org/wickedsource/budgeteer/importer/ubw/UBWWorkRecordsImporter.java	(revision a1a9033cd3e3905ed3b1c20d58d6f8b7e87225b4)
+++ budgeteer-ubw-importer/src/main/java/org/wickedsource/budgeteer/importer/ubw/UBWWorkRecordsImporter.java	(date 1572944003776)
@@ -40,7 +40,7 @@
             if (!checkValidity(workbook)) {
                 throw new InvalidFileFormatException("Invalid file", file.getFilename());
             }
-            Sheet sheet = workbook.getSheetAt(SHEET_INDEX);
+            Sheet sheet = workbook.getSheet("Aufwände gesamt");
             int i = 3;
             Row row = sheet.getRow(i);
             while (row != null && row.getCell(0) != null && row.getCell(0).getStringCellValue() != null) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants