Start a new topic

Powershell export csv to excel template

Hello

I have a code that exports a list of parts in Vault. This is the code written for Vault Data Standard:

 

function mExportCSV ()

{

$ _Data = $ dsWindow.FindName ("bomList"). Items

$ _FileNameArray = $ global: _ExportFileName.Split (".")

$ _FileExt = "." + $ _FileNameArray [$ _ FileNameArray.Count-1]

$ _FileName = $ global: _ExportFileName.Replace ($ _ FileExt, "")

$ mWf = $ env: USERPROFILE + "\ Downloads \"

$ _ExportPath = mSetFileName $ mWf $ _FileName "Excel / Text / CSV (* .csv) | * .csv"

If ($ _ ExportPath) {

$ _Data.SourceCollection | Export-CSV -Path $ _ExportPath -UseCulture -Encoding UTF8 -NoTypeInformation

}

}

 

1. I would like to do a similar export to the .xlsx file and use the .xlsx template for this.

2. Is it possible for the exported .xlsx file to automatically be added to Vault to the directory where the assembly file is located.


Txh 

E


Hello Erick,

For questions about DataStandard please visit the Vault customization forum


Kind regards,

Manuel Cassan

Hello Manuel,

I know this formum, there is nothing interesting there. My post hangs there for half a year.


E

Hello Erick,

This forum is the official forum for help with DataStandard. Not answered threads should automatically create a support ticket.


Kind regards,

Manuel Cassan

Login or Signup to post a comment