Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 10:31:47 +0000



Post From: ACSIL: write to spreadsheet on a new row for each time

[2020-08-26 00:11:02]
enemyspy - Posts: 304
This is a few days stale now, but in case you didn't already figure it out. 'Row' is not the int Row variable that you declared at top. It is the multichar constant 'Row' as the warning indicates remove the single quotes.

Also I don't know the Scope for int Row = 1. But in order for that to work it would need to be outside the scope of your study function. Or defined as a persistent variable (explained in acsil docs) or it will keep overwriting to 1 at every update interval.

try this:

//Persistent Int will be held in memory so that you don't have to Use it as a global in your DLL.
int& Row = sc.GetPersistentIntFast(0);
//You can specify different initialisation logic in this if statement if you want.
if (sc.Index == 0){
Row = 1;
}
// IF function when candle closed:

{

// Get the value from cell A4 (if it exists) and write to cell B2 in other sheet:

double CellValueA4 = 0.00;

if (sc.GetSheetCellAsDouble(SheetHandle1, 0, 3, CellValueA4))

sc.SetSheetCellAsDouble(SheetHandle2, 1, Row, CellValueA4);
Row++;

}

Date Time Of Last Edit: 2020-08-26 00:32:41