technicalkumargaurav / file-reader
There is no license information available for the latest version (v1.0.0) of this package.
A PHP application to read and process Excel, CSV, PDF files.
Package info
github.com/technicalKumarGaurav/file-reader
pkg:composer/technicalkumargaurav/file-reader
v1.0.0
2026-06-16 10:30 UTC
Requires
- phpoffice/phpspreadsheet: ^5.8
- smalot/pdfparser: ^2.12
Requires (Dev)
- phpunit/phpunit: ^11.5
README
A lightweight PHP library for reading PDF, Excel, and CSV files through a single unified API.
Features
- Read CSV files
- Read Excel files (
.xls,.xlsx) - Read PDF files
- Unified response format
- Framework independent
- PSR-4 autoloading
- Compatible with Core PHP, Laravel, and CodeIgniter
Requirements
- PHP 8.1+
- Composer
Installation
composer require technicalkumargaurav/file-reader
Usage
require 'vendor/autoload.php'; use Kumar\FileReader\Reader; $reader = new Reader(); $result = $reader->read('sample.csv'); print_r($result);
CSV Example
$result = $reader->read('sample.csv');
Response:
[
'success' => true,
'type' => 'csv',
'filename' => 'sample.csv',
'meta' => [
'rows' => 3,
'columns' => 3
],
'data' => [...]
]
Excel Example
$result = $reader->read('sample.xlsx');
Response:
[
'success' => true,
'type' => 'excel',
'filename' => 'sample.xlsx',
'meta' => [
'rows' => 100,
'columns' => 8,
'sheet' => 'Sheet1'
],
'data' => [...]
]
PDF Example
$result = $reader->read('sample.pdf');
Response:
[
'success' => true,
'type' => 'pdf',
'filename' => 'sample.pdf',
'meta' => [
'characters' => 6225
],
'data' => [
'content' => 'PDF content...'
]
]
Supported File Types
| Extension | Supported |
|---|---|
| csv | Yes |
| xls | Yes |
| xlsx | Yes |
| Yes |
Project Structure
src/
├── Drivers/
│ ├── CsvReader.php
│ ├── ExcelReader.php
│ └── PdfReader.php
│
├── Exceptions/
│ └── UnsupportedFileException.php
│
├── Helpers/
│ └── ResponseFormatter.php
│
└── Reader.php
Roadmap
v1.0.0
- CSV Reader
- Excel Reader
- PDF Reader
- Unified Response Format
v1.1.0
- File Metadata
- JSON Export
- File Validation
v2.0.0
- Laravel Integration
- CodeIgniter Integration
- DOCX Support
- Streaming Support
License
MIT License
Author
Kumar Gaurav