cmd - Add sheet with column names to Excel spreadsheet -
How do I add a sheet to an existing Excel spreadsheet?
This code overwrites the < .cmd
file and currently if the report.xls
file is present with a new file.
If EXIST% 1 \ Report.xls DEL% 1 \ Report.xls COPY% 1 \ ReportTemplate.xls% 1 \ Report.xls
Surely it is not possible in CMD, if you have PowerShell available then you can write a PS script, You can start from the file (or just do everything in powers :))
If you want to try it, there is a COM object to work in excel files, its name is "excel. Application ".
Here you make such an object in powers:
$ xls = new-object -comobject excel.application
then You can open your XL file and edit it (just Google for further instructions).
Regards
Comments
Post a Comment