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

allow to merge cells #13

Merged
merged 1 commit into from
Nov 15, 2016
Merged

allow to merge cells #13

merged 1 commit into from
Nov 15, 2016

Conversation

AlexKovalevych
Copy link
Contributor

#11

@xou
Copy link
Owner

xou commented Nov 13, 2016

Awesome!
I'll take a closer look after work tonight. Would you mind adding the feature to the example.exs?
Thanks!

@AlexKovalevych
Copy link
Contributor Author

@xou Sure, added

Copy link
Owner

@xou xou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about all the end-of-line whitespace, thanks for catching that as well!

# If you need to merge cells, send a list of tuples,
# where each tuple is a pair of start and end cell.
# For example to merge cells from A1 to C1 use:
# sheet = %Sheet{rows: rows, merge_cells: [{"A1", "C1"}]}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to integrate this into the actual executable code? (I typically run the libreoffice_test script in test/ to see if all the features appear to be working, I know this isn't optimal :/ but it would be great if that would show the expected result).
Does this work with vertical cells as well (or a combination of horizontal and vertical?) If so, would be great to include this in the example (one single "block" of merged cells should be OK), if not it would be great if you could add a quick note somewhere pointing out the limitations).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works in both ways, i'll add a code

@@ -200,6 +200,18 @@ defmodule Elixlsx.XMLTemplates do
List.foldr("", &<>/2)
end

defp xl_merge_cells([]) do
""
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nitpick: newline here please :)

@AlexKovalevych
Copy link
Contributor Author

All done

@xou xou merged commit 2eb0876 into xou:master Nov 15, 2016
@xou
Copy link
Owner

xou commented Nov 15, 2016

Great, thank you very much! I will push out a new release probably on the weekend.

@AlexKovalevych
Copy link
Contributor Author

Sure, thanks!

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

Successfully merging this pull request may close these issues.

2 participants