circovic / excel-to-coordinates
将地址转换为基于Excel文件提供的地址的地理位置坐标的包
dev-master
2021-10-16 17:48 UTC
Requires
- php: ^7.4
- ext-json: *
- guzzlehttp/guzzle: ^7.0
- phpoffice/phpspreadsheet: ^1.18
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.3
- vimeo/psalm: ^4
This package is auto-updated.
Last update: 2024-09-17 00:14:21 UTC
README
用法
Start by creating a new instance of ExcelToCoorindates class:
$excel_to_cordinates = new ExcelToCoordinates();
方法
->setExcelPath(__DIR__ . "/../example/addresses.xlsx") // (required) path to the excel file
->setAddressIterator('A') // (required) The address iterator, for better understanding please check the example excel file provided in /example
->setPostCodeIterator('B') // (required) The Post Code Iterator
->setCountryIterator('C') // (required) The country Iterator
->setGoogleApiCode('') // (required) Google API Key
->setStartRow(1) // (required) row from where you want to start
->setEndRow(2) // (required) row where converting will stop
->loadData() // (required) main function which will return array of geo coordinates
安装
`composer require cirkovic/excel-to-coordinates`
需求
* php 7.4
* ext-json
支持
至少目前,包仅支持XLSX文件,对于其他格式,请提交问题或创建带有测试的PR。
CSV即将推出。
测试
测试可以在/tests中找到。
贡献
欢迎所有人参与贡献。
鸣谢
许可协议
有关条款,请参阅本分发的根目录下的LICENSE*.TXT文件。