WriteExcel syntax help needed

Advanced programming using WinTask scripting language

WriteExcel syntax help needed

Postby Tosh on Wed Dec 09, 2015 4:13 pm

I need help writing a column to the excel I am reading from that would say Gain 08/12/015 (current date),
I tried the following Syntax:

WriteExcel ("C:\FOREX\forex.xlsx","I52:I101","Gain" date$)

What am I doing wrong here ?
Posts: 12
Joined: Thu May 05, 2005 9:56 am

Re: WriteExcel syntax help needed

Postby TechSupport on Thu Dec 10, 2015 9:36 am

WriteExcel writes an array, so you need to declare the array first using Dim at the very beginning of the script:
Dim data$(100)
and then you populate the array:
data$()="Gain "+date$()
and then you can write the data$ array using:
WriteExcel ("C:\FOREX\forex.xlsx","I52:I101",data$())

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest