1 Reply Latest reply on Oct 8, 2019 9:21 AM by LucD

    rvtools csv export - format / issue

    mlksc Lurker

      I'm using rvtools to export data to a csv file.  The problem is that some of the annotation fields (and other comment fields) are free form and causing issues with a csv import with any tools - ie:  comments with single quotes, double quotes, commas, etc.  The other rvtools export option is to use excel, however I am storing the files in Azure DataLake and bringing them in via polybase to a Azure db which supports csv files and not excel.


      I could not find a way to specify a format for the csv file, for example escape characters, always double quotes, etc.  Can you guys recommend what you do or a good solution?  Thanks.

        • 1. Re: rvtools csv export - format / issue
          LucD Guru
          User ModeratorsvExpertCommunity Warriors

          I'm not aware of any output transformation functionality in RVTools itself.

          But you could replace the annoying characters in the Notes field after the export with a short PowerShell script.

          Have for example a look at Re: Export and Import VM Multi line notes


          In your case you could do the following to remove the newlines (and replace them by a blank).


          Import-Csv -Path rvtools.csv -UseCulture |

          ForEach-Object -Process {

              $_.Name = $_.Notes.Replace("`n",' ')


          } | Export-Csv -Path new-rvtools.csv -NoTypeInformation -UseCulture


          Other changes can be done with a series of calls to the Replace method