samuelvi / spreadsheet-translator-provider-onedrive
Spreadsheet Translator - One Drive Provider with no authentication
Installs: 6
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/samuelvi/spreadsheet-translator-provider-onedrive
Requires
- php: >=8.4
- guzzlehttp/guzzle: ^7.9
- samuelvi/spreadsheet-translator-core: ^8.0
Requires (Dev)
- phpunit/phpunit: ^11.5
- rector/jack: ^0.2.9
- rector/rector: ^2.1
This package is auto-updated.
Last update: 2025-11-08 19:34:51 UTC
README
This package provides a OneDrive provider for the Spreadsheet Translator project. It fetches shared spreadsheet documents from Microsoft OneDrive without requiring authentication.
Features
- Fetch publicly shared spreadsheets from OneDrive
- No authentication required (works with public share links)
- Automatic conversion from embed URLs to download URLs
- Integrated with the Spreadsheet Translator ecosystem
Requirements
- PHP >= 8.4
- Spreadsheet Translator Core ^8.0
Installation
Install via Composer:
composer require samuelvi/spreadsheet-translator-provider-onedrive
Usage
use Atico\SpreadsheetTranslator\Core\Configuration\Configuration; use Atico\SpreadsheetTranslator\Provider\OneDrive\OneDriveProvider; $configuration = new Configuration([ 'source_resource' => 'https://onedrive.live.com/embed?id=YOUR_FILE_ID', 'temp_local_source_file' => '/tmp/spreadsheet.xlsx', 'format' => 'xlsx', ]); $provider = new OneDriveProvider($configuration); $resource = $provider->handleSourceResource(); // The spreadsheet is now downloaded to the temporary file echo $resource->getValue(); // /tmp/spreadsheet.xlsx
Development
Available Make Commands
make help # Show available commands make install # Install dependencies make update # Update dependencies make test # Run tests make test-coverage # Run tests with HTML coverage report make rector # Run Rector to refactor code make rector-dry # Preview Rector changes without applying make jack # Check for outdated dependencies make quality # Run quality checks (rector + tests) make check # Check code without making changes make clean # Clean generated files make ci # Run CI pipeline locally
Running Tests
# Run all tests make test # Or using Composer composer test # Run with coverage make test-coverage
Code Quality
This project uses Rector for automated code refactoring:
# Preview changes make rector-dry # Apply changes make rector
Related Packages
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and code quality checks (
make check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- All tests pass
- Code follows PHP 8.4 standards
- New features include tests
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Samuel Vicent - samuelvicent@gmail.com