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

Feature/csv variable columns #1415

Closed

Conversation

AndrewMonty
Copy link

This is:

  • a bugfix
  • a new feature

Checklist:

Why this change is needed?

#1414

Sometimes CSV files contain content that isn't intended as a column header, and
may not align with proceeding values as columns. In this case it's likely undesirable
to have proceeding rows filled with blanks to match the column count of the longest row.

…each individual row.

Sometimes CSV files contain content that isn't intended as a column header, and
may not align with proceeding values as columns. In this case, proceeding rows
should not be filled with blanks to match the column count of the longest row.

This adds a new flag to the Csv Writer, letting the user override the default
behavior of exporting a range based on the highest row and highest column
overall, instead calculating the range on a per row basis so that "shorter"
rows are not filled with blanks.
@stale
Copy link

stale bot commented May 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label May 10, 2020
@stale stale bot closed this May 17, 2020
@oleibman oleibman reopened this Jun 26, 2024
@stale stale bot removed the stale label Jun 26, 2024
@oleibman
Copy link
Collaborator

Writer/Csv has changed just enough that this code can no longer be used. I will see if I can salvage it.

oleibman added a commit to oleibman/PhpSpreadsheet that referenced this pull request Jun 27, 2024
Supersedes PR PHPOffice#1415 by @AndrewMonty, which went stale in May 2020, and which is not directly usable due to changes between now and then. Fix PHPOffice#1414, which also went stale; I will remove the stale status and reopen the issue pending the merging of this PR.

Add an option to CSV Writer so that it writes the cells for a row only through the highest data column used in the row, rather than through the highest data column used in the worksheet.
@oleibman
Copy link
Collaborator

Superseded by PR #4076.

@oleibman oleibman closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants