Can we use Excel file in zap-fix?

Can we use Excel file in zap-fix?

Home Forums ZAPTEST Old Posts Can we use Excel file in zap-fix?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30576
    Sasha ZAP
    Moderator

      Hello BarbJack,

      Thank-you for your question.

      Basically in our latest Zap-fix Standalone versions there is already the following Excel file’s feature:
      Datatable.ImportCSV(<path>) – Imports Datatable to CSV during runtime.
      To read from a runtime Excel datatable:
      x = Datatable.Value("Name of the Spreadsheet")
      To write into a runtime Excel datatable:
      Datatable.Value("Name of the Spreadsheet") = x

      Our R&D Department works to implement the Export method as well.

      Until the new method will be published in teh next build you can use the following VBScript code to importexportreadwrite into and Excel file:

      Set objExcel = CreateObject("Excel.Application")
      objExcel.Visible = True
      Set objWorkbook = objExcel.Workbooks.Open("C:Test.xls")
      Set objWorksheet = objWorkbook.Worksheets(1)
      ‘Write into Excel Worksheet
      objWorksheet.Cells(1, 1).Value = "Number"
      objWorkbook.Save()
      ‘Read from Excel Worksheet
      value = objWorksheet.Cells(1,1).Value

      objExcel.Quit
      Set objWorksheet = Nothing
      Set objWorkbook = Nothing
      Set objExcel = Nothing

      Please contact Zap for further help.

      Thanks,
      Sasha

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.

    Virtual Expert

    ZAPTEST

    ZAPTEST Logo