Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

DB output converting to excel

I have a scenario where i need to convert DB output to a Excel.
I have tried out "write file" with the below details
Target name : filename.xlsx
Target Directory: path

A xlsx file is created in the path, but i am unable to open it.
It is showing file format is invalid or corrupted.

Can some one help me on this

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭

    The DB Tool output is XML. Saving that XML as a file with ".xslx" file extension does not somehow convert the XML to Excel spreadsheet format.

    Instead, you can chain an XML Convertor tool configured with "Format" set to "CSV" and "Conversion direction" set to "From XML to native". Then you can chain a Write File tool to write a ".csv" file which can be opened in Excel.

    Instead of using the XML Convertor tool, you can also convert XML documents to CSV using the XSLT tool configured with an XML stylesheet to perform the conversion. See Using XSLT to create csv or XML to CSV Using XSLT.