Things are much simpler! For the BarLegend you do not even need Min and Max, try:
txtData = { - your imported textdata - };
data = ToExpression[First@txtData];
graph3D =
ListPlot3D[data, ColorFunction -> "Rainbow", PlotLabel -> "3D",
PlotLegends -> Automatic]
Henrik