Is there a way to automatically reference filenames in Calc?

I have a spreadsheet that combines data from other sheets. I use a formula similar to this:

=DOSOMETHING('file:///C:/Users/User/myfile01.csv'#$myfile01.AB$2:AB$1000)

I have 50 files ranging from myfile01.csv to myfile50.csv. Is there a way to automatically let Calc change the number from 1, 2, 3, …, 50? I have a column (A) that has all these numbers and thought it could be possible to reference it somehow, but I didn’t find anything. I am thinking about something like:

=DOSOMETHING('file:///C:/Users/User/myfile<A>.csv'#$myfile<A>.AB$2:AB$1000)

I am using Win 7, LO Calc v. 5.0.6.3

Assuming a file name part is in cell A1 you could try something like DOSOMETHING(INDIRECT("'file:///C:/Users/User/myfile" & A1 & ".csv'#$myfile" & A1 & ".AB$2:AB$1000"))

However, massive use of the INDIRECT() function may slow recalculation down (50 is not massive fwiw). And of course, since the AB$2:AB$1000 reference would be a string then, there’s no automatic adjustment of the reference when pulling or copying the formula cell.

Works like a charm, thanks!