8000 GitHub - Parmij/ValidateExcelFileFormat: a psr-4 package to validate excel file format and its data.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Parmij/ValidateExcelFileFormat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ValidateExcelFileFormat

a psr-4 package to validate excel file format and its data. It validates unlimited type of excel files by just adding or define a rule to each type. This code uses Factory design pattern which facilitates changing or adding a new type to the project easily.

General Rules

  1. Column name that starts with # should not contain any space
  2. Column name that ends with * is a required column, means it must have a value
  3. For each file type, it validates the header columns name and and the amount of columns it has. For example, Type_A file should only contains 5 columns and the header column name should be and follows the following order;
  • Field_A*
  • #Field_B
  • Field_C
  • Field_D*
  • Field_E*
  1. The package validate both .xls and .xlsx files
Sample Output when validating Type_A.xlsx
Row Error
3 Missing value in Field_A, Field_B should not contain any space, Missing value in Field_D
4 Missing value in Field_A,Missing value in Field_E

About

a psr-4 package to validate excel file format and its data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0