Oi dinovoooo!! Gente tow com um negócio aqui q tah me deixando doida... Alguém sabe como organizar dados em uma tabela (linhas e colunas)? ex.: CAF COMANDO AÉRIO DO FLAMENGO DEF DEPARTAMENTO ELÉTRICO FERROVIÁRIO .... O q tow conseguindo fazer é: CAF COMANDO AÉRIO DO FLAMENGO DEF DEPARTAMENTO ELÉTRICO FERROVIÁRIO fiz isso aqui: #include <iostream> #include <fstream> #include <string> #include <sstream> #include <stdlib.h> using namespace std; int main () { string line; string cod; int test; ifstream myfile("dados.txt"); ofstream examplefile ("example.xls"); if (myfile.is_open()) { while (!myfile.eof()) { getline (myfile,line); cod = line.substr(0,2); if (cod.compare("01") == 0){ cout << line.substr(8,6) <<endl; examplefile << line.substr(8,6)<<"\n"; examplefile << line.substr (14,40)<<"\n"; }if (cod.compare("02") == 0){ cout << "eitaaaa\n"; examplefile << line.substr (0,2)<<"\n"; } } } system ("pause"); } Tow usando o DEV-C++.. Valewww!!!