diff --git a/.idea/php.xml b/.idea/php.xml index 557c1db..6a1b2d2 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -12,7 +12,6 @@ - @@ -59,6 +58,9 @@ + + + diff --git a/bin/csv2xlsx.php b/bin/csv2xlsx.php new file mode 100755 index 0000000..0f0bb32 --- /dev/null +++ b/bin/csv2xlsx.php @@ -0,0 +1,7 @@ +#!/usr/bin/php +args[0] ?? null); + $inputname = path::filename($input); + $output = path::ensure_ext($inputname, ".xlsx", ".csv"); + + $reader = SsReader::with($input); + $builder = SsBuilder::with($output); + $builder->writeAll($reader); + $builder->build(); + $builder->copyTo(file::writer($output), true); + } +}