I do an example myself with the new given information f I understand the pinciple:
The example will use numbers of the picture of the excel-sheet you posted
The load-cell connected to the Arduino sends a value "654" over serial to the NodeMCU
The Arduino sends a temperature-value let's say -8,5.
This means the nodeMCU receives a value "654" and "-8.5"
654 means open file named "654.txt"
-8.5 means lookup that line inside file 654.txt where in the first columm is value -8.5 and pick the corresponding density which is "631.4" in this case.
If I look into your textfiles there is only a single columm with density-values.
How shall this work?
Do you want to calculate an offset?
This would mean all *.TXT-files start with -10.0 stepping down with 0.25 steps
so to use the above example again -8.5 is the
10.0 - 8.5 = 1.5 / 0.25 is the 6th line inside your textfile pluse some additional offset from the strange values at the beginning?
I think this would be error-prone.
I would store the densities and the temperature-values in each file.
If this needs too much memory you could create a CSV-file.
A comma-separated-value file just right from your excel-sheet.
°C,650,651,652,653,654,655
0,1,2,3,4,5,6,7
-10,-,-,-,628.9,630,631
...
...
...
-8.5,-,-,-,630.4,631.4,632.4
The commas are the separators
Then you would scan the first line for value 654 which is columm 6
then you would scan the lines until value "-8.5" is found and then take value from columm 6
This all is just read in a line of the file and then do certain string manipulatings.
The library SafeString has a lot of functions like find position of substring
give back value of next columm etc., etc., etc.
So make a decision which solution you want to use
a single file with all load-cell-values
or multiple files for each load-cell-value
and then write a first attempt how you would program reading from your textfile.
For tests I would recommend that you use easy to identify load-cell values
the loadcell values start in columm 2
so for testing use the values 222, 333, 444, 555
and as densities
200.1, 300.1, 400.1, 500.1
200.2, 300.2, 400.2, 500.2
200.3, 300.3, 400.3, 500.3
etc. etc.
So you can see very easily if the right line and the right columm are chosen.
This example has a reduced size compared to your complete data but it is still able to explain the relations and by using concrete values everybody can see how the values relate to each other.
If my description is not wrong than correct it and explain it with the same principle as I have done it.
best regards Stefan