You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the attached CSV and iterating through it with Tabitha (version 0.2.0), it appears to be starting halfway through the document rather than at the beginning. Here's my code:
try (InputStreamdelimFileStream = fileUrl.openStream();
RowReaderreader = RowReaderFactory.open(delimFileStream)
.orElseThrow(() -> newOpeningReaderException(String.format(
"Could not open reader for URL (%s), MIME type of %s.",
url,
fileMime))
)
.withInlineHeaders()) {
RowfirstRow = reader.read().orElse(null);
firstRow.header().ifPresent(header -> log.info("Header: " + Arrays.toString(header.toArray())));
reader.forEach(row -> {
List<String> strs = newArrayList<>();
row.forEach(cell -> strs.add(cell.getString().orElse("empty")));
log.info(strs.toString());
});
}
What Tabitha is registering as the header (the first row it has found) is actually line 526 in the CSV.
Turning this CSV into an XLSX via Microsoft Excel and then using that as the input to the code above works correctly (ignore the "empty" strings - I realize that's my problem and not a Tabitha problem):
Header: [Transaction_date, Product, Price, Payment_Type, Name, City, State, Country, Account_Created, Last_Login, Latitude, Longitude]
[empty, Product1, empty, Visa, Betina, Parkville , MO, United States, empty, empty, empty, empty]
[empty, Product1, empty, Mastercard, Federica e Andrea, Astoria , OR, United States, empty, empty, empty, empty]
...all the rest of the items...
CSV is attached as a .txt, as Github does not allow CSVs to be added as attachments.
Using the attached CSV and iterating through it with Tabitha (version 0.2.0), it appears to be starting halfway through the document rather than at the beginning. Here's my code:
This prints the following:
What Tabitha is registering as the header (the first row it has found) is actually line 526 in the CSV.
Turning this CSV into an XLSX via Microsoft Excel and then using that as the input to the code above works correctly (ignore the "empty" strings - I realize that's my problem and not a Tabitha problem):
CSV is attached as a
.txt
, as Github does not allow CSVs to be added as attachments.SalesJan2009.txt
salesjan2009xl.xlsx
The text was updated successfully, but these errors were encountered: