Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PHP_XLSXWriter
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 101
    • Issues 101
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mk-j
  • PHP_XLSXWriter
  • Merge requests
  • !331

Allow column types to be overridden when writing sheet rows

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Andrzej Brynczka requested to merge github/fork/PropertyBrands/master into master 2 years ago
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 2

This PR adds a new writeSheetRowWithColTypes method used to set or override column types while writing row data.

The original column types defined by writeSheetHeader are retained so that the process can revert back to them after writing the current row's data, allowing the header versions to serve as default definitions for the columns.

Additionally, users can limit the column type override to target specific columns rather than the entire row:

$writer->writeSheetHeader($sheet, ['col1' => 'string', 'col2' => 'integer']);
$writer->writeSheetRow($sheet, ['val1', 1]);

$writer-> writeSheetRowWithColTypes($sheet, ['val2', 'n/a'], [], ['string', 'string']); // override the entire row
$writer-> writeSheetRowWithColTypes($sheet, ['val3', '?'], [], [1 => 'string']); // override col 2 only

Activity

  • Loading
Please register or sign in to reply
Status
Pipeline
Triggerer
Stages
Actions

2 years ago

Added new 'writeSheetRowWithColTypes' method, used to set or override column types while writing row data.
#1204
github/fork/PropertyBrands/master a7e4f16a
latest Auto DevOps
avatar
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Administrator
Andrzej Brynczka
Reference: mk-j/PHP_XLSXWriter!331
Source branch: github/fork/PropertyBrands/master

Menu

Explore Projects Groups Snippets