Forum Discussion

richv's avatar
richv
Occasional Contributor
13 years ago

.xlsx to csv

currently i run all my tests from scripts in .csv files.  in the future i would prefer maintain my scripts in xlsx 

do you have some sample code which would allow me to convert an .xlsx to a csv in my test 

3 Replies

  • gid_216's avatar
    gid_216
    Frequent Contributor
    Hi Richard,

    Try this




    Dim oExcel


    Dim oBook


    Const intCSVFormat = 6


    Set oExcel = CreateObject("Excel.Application")


    Set oBook = oExcel.Workbooks.Open("[Excel Path]")


    oBook.SaveAs "[CSV Path]", intCSVFormat


    oBook.Close False


    oExcel.Quit

  • richv's avatar
    richv
    Occasional Contributor
    Hi Deepak   Are you using xlsx files to maintain your test scripts?