Jump to content
Sign in to follow this  
DaLiMan

Filewrite

Recommended Posts

Hi there,

I have a script wich writes to a .txt script.

But I was thinking, why not directly into Excel.

I changed the script, but nothing happens anymore.

The file stays empty.

Can't this be done, or am I forgetting something.

Below a piece of my script:

Else
   Global $File = FileOpen("C:\Progra~1\VCG\Files\Templates\VCG.xls", 1)
   If $file = -1 Then
      MsgBox(0, "Error", "Unable to open file.")
      Exit
   EndIf
   FileWrite($file, $Clippy1 & @CRLF)
   FileClose($File)
   ControlSend($title, "", "", "{PGDN}")
   Sleep (250)
   $Endinfo2 = 1
   $Aantal2 = $Aantal1 + 1
   $Aantal1 = $Aantal2
EndIf   
Wend

He, new smilies.... :ph34r:

Share this post


Link to post
Share on other sites

XLS-files contain binary data and AutoIt is unable to read or write binary data so the easiest way would be to write the data to a CSV-file and open this file in excel.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...