Forumsee logo

Looking for ELD help...exporting to excel

Trading Software | Elite Trader - www.elitetrader.com
Im looking for help on an eld file used to export data from TS to excel. Below is the code I'm using to export said data, for me I'm only interested in the last price.

The particular issue I'm having is the sheet number the data is being exported too. Under Inputs, the line "ExcelSheetName( "Sheet1" )", the data exports to Sheet1 of the excel file. One of the problems is, I need to export data from 5 different markets and when I insert the analysis technique into each chart, it overrides the last chart I inserted the technique into. One option is to go in and relabel the sheet #, so sheet2, sheet3, ect. The problem is, I need all the data from each chart on one sheet.

The issue is that this data is being imported into another program and the program doesn't play nice with additional sheet numbers. So I need a way to insert this into each chart, without it conflicting with other charts that have the same analysis technique and to have it save the data on their own rows on the same sheet1? Thanks

using elsystem ;

using elsystem.office.excel ;

using elsystem.collections ;

using tsdata.marketdata ;

inputs:

ExcelFileNameWithPath( "C:\MyFile.xlsx" ),

ExcelSheetName( "Sheet1" ),

Int UpdateInterval(2);

variables:

Workbook WB( NULL ),

Sheet Sheet1( NULL ),

Timer Timer1( NULL ),

intrabarpersist Row(0);

method void Timer1_Elapsed( elsystem.Object sender, elsystem.TimerElapsedEventArgs args )

begin

Sheet1.Cells[3, Row + 1] = Last ;

end;

once

begin

//---------------------------

//Workbook WB

//---------------------------

WB = new Workbook;

WB.FileName = ExcelFileNameWithPath;

WB.Shared = true;

WB.Visible = true;

WB.Load = true;

WB.SaveOnClose = false;

WB.Name = "Workbook1";

//---------------------------

//Sheet Sheet1

//---------------------------

Sheet1 = WB.Sheets[ ExcelSheetName ];

//---------------------------

//Timer Timer1

//---------------------------

Timer1 = new Timer;

Timer1.Interval = 2000;

Timer1.Name = "Timer1";

Timer1.elapsed += Timer1_Elapsed;

Timer1.Interval = UpdateInterval * 1000;

Row = GetAppInfo( aiRow );

Sheet1.Cells[1, Row + 1] = Symbol ;

Timer1.Start();

end;

Plot1( Last, "Last" );

Value99 = Close; More...

 
Date: Jun 19, 2017   



Cars ·
Travel ·
production-frontend