Service Virtualization

  • 1.  Write data in excel using dev test 9.5.1

    Posted Jul 19, 2018 04:52 AM

    Hi Team,

    I have a query regarding writing data in an excel file

     

     

    In step Write properties To File, if .xls extension is used  the file gets created but while i try to open the file i get an error ' Invalid File Format"

    Could you please let me know if we can write data in an excel sheet using Dev Test version 9.5.1



  • 2.  Re: Write data in excel using dev test 9.5.1
    Best Answer

    Posted Jul 19, 2018 09:11 AM

    By open the file, I assume you mean that Excel is giving the message 'Invalid File Format', correct?

     

    DevTest does not attempt to format data based on the basis of the file type (suffix). In other words, a file ending in '.pdf' does not cause DevTest to generate a PDF format document. Similarly, a file ending in '.xml', '.xls', '.xlsx', '.pptx', '.java', etc does not cause DevTest to store the file in a format compatible with the file's suffix.

     

    If the output to store contains a delimiter, try saving the file with a '.csv' extension. When opening in Excel, use the conversion features of Excel to parse the CSV file into a format supported by Excel.

     

    If your requirement is that you must write into an Excel formatted document, you will likely need to use the POI classes (in some earlier posts) to create an actual Excel Workbook with Sheets, rows, and columns and data values.