line.Split(',') cuts a string into an array at each separator. Add StringSplitOptions.RemoveEmptyEntries to drop empty pieces and StringSplitOptions.TrimEntries to trim each one. string.Join(", ", values) goes the other way.
Because strings are immutable, text += piece in a loop copies the whole string every time. For more than a handful of pieces, use StringBuilder from System.Text: Append, AppendLine, then ToString() once at the end.
Parsing text into numbers depends on culture: in German, "1,5" is one and a half. Data files should be parsed with CultureInfo.InvariantCulture from System.Globalization: decimal.Parse(text, CultureInfo.InvariantCulture). When input may be bad, decimal.TryParse returns false instead of throwing FormatException.
Split with options, parse with the invariant culture, build text with StringBuilder.