Arduino comma delemited output SD

Hi,

I am using this code to output data to an Excel (.CSV) file.
when I view it the concurrent output is not in each cell, instead it is in one cell, seperated with commas.
I also tried printing the data without the string, didn't turn out quite well for me.
Help please.

#include <SD.h>
#include <DHT.h>
#include <SPI.h>
#include <stdlib.h>

//sensor settings
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
int id=1;
const int chipSelect = 4;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  //mitruma sensor
  dht.begin();
  //kustības sensors
  pinMode(4, OUTPUT);
  digitalWrite(4, HIGH);
 //SD card;
  Serial.print("Initializing SD card...");
 
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    return;
  }
  Serial.println("card initialized.");
                  File logFile = SD.open("LOG.csv", FILE_WRITE);
              if (logFile)
                {
                logFile.println(", ,");
                String header="ID,T,H%";
                logFile.println(header);
                logFile.close();
                Serial.println(header);
                }
                  else
                {
                  Serial.println("Couldn't read");
                 }
            
}

void loop() {

  char tempT[10];
  char rhPct[10];
     dtostrf(dht.readTemperature(), 4, 1, tempT);
     dtostrf(dht.readHumidity(), 4, 1, rhPct);
     //saves data to SD card Log file
            String dataString = String(id) + "," + String(tempT) + "," +String(rhPct);
              File logFile = SD.open("LOG.csv", FILE_WRITE);
              if (logFile)
                {
                logFile.println(dataString);
                logFile.close();
                Serial.println(dataString);
                }
                  else
                {
                  Serial.println("Couldn't open log file");
                 }
                 id++;
   
  delay(3000);
 
}

Solved it myself. Incase someone is searching for a solution like I am turns out I had language regional settings enabled on ";" instead of ",".

You can change this setting by

Click the Windows Start menu.
Click Control Panel.
Open the Regional and Language Options dialog box.
Click the Regional Options Tab.
Click Customize.
Type a new separator in the List separator box.
Click OK twice.

                String header="ID,T,H%";
                logFile.println(header);

That is just plain pissing away resources unnecessarily.

            String dataString = String(id) + "," + String(tempT) + "," +String(rhPct);
              File logFile = SD.open("LOG.csv", FILE_WRITE);
              if (logFile)
                {
                logFile.println(dataString);

This is really not necessary, either. 3 print() and 1 println() calls are not that tedious to enter.

Thanks, for the post. I just needed the comma part to work. I tidied my code up afterwards I got my comma working :).