Using ifstream in SdFat to get pwm values from csv-file for a LED-Cube

Hi everybody,

I´m working on a 8x8x8 RGB LED Cube and I want to get the pwm values for the LEDs from a sd card.
I think it would be the best to read those values from a csv file. But here is my problem.
I already tried to change the example readCSV.ino but my c++ skills don´t seem to be good enough.
Especially with the ifstreams.
I want a structure like this.

line 1,pwmValue1, pwmValue2, ....
line 2,pwmValue1, pwmValue2,...
......

I need 192 values per line and 8 lines are for one layer.

Is it possible/ does it make sense to do it this way?
Can anybody help me with the programming?

Thank you