Excel filename sequence

 

Hello

Apologies for another really dumb question, but its beyond me!

In my EA, I'm collecting and writing data into weekly Excel spreadsheets, which I'm incrementally numbering, creating one new sheet per week. This is fine, but I end up with spreadsheets all named as numbers only. I'd like to use Symbol() + number, and I'm trying to do it thus:

double v1= SpreadsheetNumber;
string s1=(Symbol(),v1);

SpreadsheetFilename=s1;

But, as I'm sure anyone other than me could see without testing, this isn't quite working!

I'd be very grateful if someone could give me the correct syntax.

Thanks again.

 
string s1=(Symbol(),v1);
This does not glue Symbol() and your number together.

Either use StringConcatenate(...) or in your case use Symbol()+v1.

Beside that the SpreadsheetNumber should be int I guess.

int    v1= SpreadsheetNumber;
string s1= Symbol() + v1;

SpreadsheetFilename = s1;
 
gooly:
This does not glue Symbol() and your number together.

Either use StringConcatenate(...) or in your case use Symbol()+v1.

Beside that the SpreadsheetNumber should be int I guess.



gooly

Thank you so much for your help. Much appreciated.

Reason: