Portland, OR
Experience: Intermediate
Platform: Sierra Chart
Trading: ES
Posts: 269 since Jan 2011
Thanks Given: 327
Thanks Received: 180
|
Martin - I have used this in the past. If I recall - you can't really open the spreadsheet directly but it can read/write to an already open spreadsheet. I would try to find an example code to perform couple of these operations ( have to dig through and also need to make sure they work.
This is a sample code ( compiles fine but haven't tested it completely):
----
Vars:WorkbookName("Test.xls");
Vars:WorksheetName("Sheet1");
Vars:Initialized(false);
Vars:boolXLStarted(false);
Vars:boolWorksheetReady(false);
Vars:boolGetRtn(false);
Vars:boolSetRtn(false);
Vars:var1(0);
Vars:var2(0);
Vars:var3("");
Vars:var4("");
// Initialization
Once(CurrentBar=1)begin
ifInitialized=falsethen
begin
XLStarted = ELXL_Initialize ;
WorksheetReady=ELXL_WithSheet(WorkbookName,WorksheetName);
ifXLStartedandWorksheetReadythenInitialized=true;
end;
ifInitialized=falsethenraiseruntimeerror("Excel Initialization Failure");
end;
// Main Program
iflastbaronchart_sandbarstatus(1)=2thenbegin
GetRtn=ELXL_GetcellNumberRC(2,1,var1);// Second Row Column 1
SetRtn=ELXL_SetCellNumberRC(2,2,var1);// Second Row Column 2
GetRtn=ELXL_GetCellStringRC(3,1,var3);
SetRtn=ELXL_SetCellStringRC(3,2,var3);
end;
-------
|