obad62
asked on
Read Ascii data file -Qt
Hi,
I have this smaple of data for 12 record from the compleat file which has 41000 record so, what is the easy way to read the first 50 record as ascii data into Qt c++ programe. I have read there are Qfile and Qdata streame ...but which approperate. Also, are there any useful links or code for that.
Thanks in advanced
Sample.xlsx
I have this smaple of data for 12 record from the compleat file which has 41000 record so, what is the easy way to read the first 50 record as ascii data into Qt c++ programe. I have read there are Qfile and Qdata streame ...but which approperate. Also, are there any useful links or code for that.
Thanks in advanced
Sample.xlsx
ASKER
thanks for your responce
I have excel file which has 41000 row I need to read 10 rows only i used this code but nothing :
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
string line;
ifstream myfile ("example.txt");
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
cout << line << endl;
}
myfile.close();
}
else cout << "Unable to open file";
return 0;
}
I have excel file which has 41000 row I need to read 10 rows only i used this code but nothing :
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
string line;
ifstream myfile ("example.txt");
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
cout << line << endl;
}
myfile.close();
}
else cout << "Unable to open file";
return 0;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As I said to you problem in the file location
>>>I have this smaple of data for 12 record from the compleat file which has 41000
I am sorry I could not understand your question good, Can you please explain a bit, Do you mean that You have a data base which is having 41000 records? IS that in some RDBMS or DBMS like oracle or mySql sort of data base,? OR is that simple stored in some text file???
WHat do you mean by " I have sample of Data for 12 Records" ????
please explain