-
Notifications
You must be signed in to change notification settings - Fork 323
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
Adding Append support to Excel.Write #3558
Conversation
b85ad70
to
37d6a67
Compare
6d0d619
to
f8abb1b
Compare
4733e64
to
5e0a68e
Compare
da29efe
to
9d165d3
Compare
- Added File.copy_to - Removed writeSpreadsheetCell. - Added ExcelWriter.
Still to do Range based.
Header Infer based on current
Fix issues with BLANK cells.
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org>
9d165d3
to
f13ae51
Compare
Making append mismatch be errors.
distribution/lib/Standard/Table/0.0.0-dev/src/Data/Map_Columns.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Table/0.0.0-dev/src/Data/Map_Columns.enso
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/write/ExcelWriter.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/write/ExcelWriter.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/write/ExcelWriter.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/write/ExistingDataMode.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, but some documentation seems to be suggesting different behavior than the implementation. Unless I'm mistaken, these should be aligned as otherwise the docs will be misleading.
Other than that, some stylistic suggestions.
std-bits/table/src/main/java/org/enso/table/write/ExcelWriter.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/util/ColumnMapper.java
Outdated
Show resolved
Hide resolved
std-bits/table/src/main/java/org/enso/table/write/ExistingDataMode.java
Outdated
Show resolved
Hide resolved
test/Table_Tests/src/Excel_Spec.enso
Outdated
(Enso_Project.data / test_sheet_name) . copy_to out | ||
extra_another = Table.new [['A', ['d', 'e']], ['B',[4, 5]], ['C',[True, False]], ['D', ['2022-01-20', '2022-01-21']]] | ||
expected = Table.new [['AA', ['a','b','c','d', 'e']], ['BB',[1,2,3,4,5]], ['CC',[True, False, False, True, False]]] | ||
extra_another.write out (File_Format.Excel (Cell_Range "Another!A1")) on_existing_file=Existing_File_Behavior.Append column_mapping=Match_Columns.By_Position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised that because we use the top-left cell A1
as our reference point, we don't really check if we correctly handle the table location - we could completely ignore this coordinate and just append to the first table in the sheet, like the Sheet "foo"
selector would, and still pass this test... Which isn't great.
I'd suggest to modify this test to locate the table somewhere else than in the top-left corner.
Also to make things a bit more complicated, I'd suggest placing another table somewhere else within that sheet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the changes.
I don't want to stall the PR, so let's get this merged, but please let's add the edge test cases, that we've been discussing, in a separate PR.
Pull Request Description
Adds support for appending to an existing Excel table.
Important Notes
Column_Mapping
toColumn_Name_Mapping
Map_Column
File
.Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide dist
and./run ide watch
.