**
import a data table with space?
**
Good day!
I need to read in all the data in a file within column two and export it in a file. The issue is the data is not standard and has blank fields from time to time. It also has issues like "N/A" that i would want to delete. So i just need some direction. C... is a fickle beast ya know.
The reason being i need to inport a printer file and process the information to export only the document numbers. for example...
10 HIHM07A1 10 Hj NDt
20 N/A 0 NONE PRt
3.4 JJKKM090 DDR
So fscanf will read it in and allow some fun; however, it gets very messy with those spaces. I need it to read in all of column two and export them in a list.
here is where i am so far.
FILE *fp;
fp = fopen("nums.txt","r");
char in1[50], in2[50], in3[50], in4[50], in5[50];
while(!feof(fp)){
fscanf(fp,"%s %s %s %s %s",in1, in2, in3, in4, in5);
printf("%s %s %s %s %s\n",in1, in2, in3, in4, in5);
}
Thanks all
Shane