
Jonathan Deliz (Customer) asked a question.
Looking for VB or PowerSHELL task script that can convert XLSX file into CSV file
Looking for VB or PowerSHELL task script that can convert XLSX file into CSV file. Not sure yet if the XLSX will have only one tab or multiple. For now, assume just a single tab. Straight forward conversion too standard CSV to be ran from advanced task in scheduled MOVEit job. Excel is not installed at this time and no plans to install...though could be an option if that is the only viable solution.
Thanks and gratitude,
Jonathan
I've done something similar using PowerShell. The key was to use the ImportExcel module from the PowerShell Gallery. It can create/modify single or multi-tab Excel workbooks without requiring Excel to be installed on the server. The module's author (not me) is responsive and helpful.
Jonathan Deliz
Clinical Application Architect - Foreign System Interfaces
Ph: 239-778-7136
NCH Healthcare System, Inc.
350 7th Street North | Naples, FL 34102
jonathan.deliz@nchmd.org<mailto:jonathan.deliz@nchmd.org> - www.nchmd.org<http://www.nchmd.org>
If you don't have Microsoft Office installed on your MOVEit server, (most of us probably don't), you will need to use a Powershell script to convert an .xlsx to csv. You will need to download and install the 32-bit version of the Microsoft Access Database Engine Redistributable. This is because MOVEit runs the PowerShell x86 version. You can double check this by including this in your powershell script:
$is64 = [Environment]::Is64BitProcess
$miaclient.MILogMsg("Env64: $is64")
Open the log for the task run and check if the result was either "True" or "False". Mine was 'False'. I will check the code share to see if anybody has provided a PowerShell script to achieve this.
Can you share the script that was implemented?