Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/le-phare/import
Import CSV/XLS files
https://github.com/le-phare/import
csv excel import php xlsx
Last synced: about 1 month ago
JSON representation
Import CSV/XLS files
- Host: GitHub
- URL: https://github.com/le-phare/import
- Owner: le-phare
- License: mit
- Created: 2017-06-18T13:12:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T14:11:58.000Z (4 months ago)
- Last Synced: 2024-11-12T21:42:59.548Z (about 2 months ago)
- Topics: csv, excel, import, php, xlsx
- Language: PHP
- Size: 82 KB
- Stars: 5
- Watchers: 9
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Import
## Resources
- [Report issues](https://github.com/le-phare/import/issues)
## Archive
Archive affects imported files/resources when a `ImportEvents::POST_COPY` event is triggered.
For archive to take effect on a imported resource, you need to explicitly define:
- the `archive.enabled` value to `true`
- the `resources.references.load` node```yaml
name: stock
source_dir: "var/exchange/in"archive:
enabled: true
dir: "var/exchange/in/foo/stock"
rotation: 60resources:
references:
tablename: import.stock
load:
pattern: "^stock.csv$"
```The file will move to a default `archives` directory in the defined `source_dir` or in the `archive.dir` if you explicitly define its value.
The `archive.rotation` define define the number of files to keep before deletion.
## Quarantine
Quarantine affects imported files/resources when a `ImportEvents::EXCEPTION` event is triggered (before)
For quarantine to take effect on a imported resource, you need to explicitly define:
- the `quarantine.enabled` value to `true`
- the `resources.references.load` nodeThe subsequent `stock.csv` file will be quarantined if an import exception happen during the import process.
```yaml
name: stock
source_dir: "var/exchange/in"quarantine:
enabled: true
dir: "var/exchange/in/bar/stock"
rotation: 60resources:
references:
tablename: import.stock
load:
pattern: "^stock.csv$"
```The file will move to a default `quarantine` directory in the defined `source_dir` or in the `quarantine.dir` value if you explicitly define its value.
The `quarantine.rotation` define define the number of files to keep before deletion.