Mensaje    Asunto: Copiar Celdas de Excel a StringGrid Responder citando

Libreria
Código:
#include <clipbrd.hpp>

Funcion
Código:
void split(wchar_t delimiter, UnicodeString str, TStringList *listofstrings)
{
   listofstrings->Clear();
   listofstrings->Delimiter = delimiter;
   listofstrings->StrictDelimiter = True; // Requires CBXE o superior.
   listofstrings->DelimitedText = str;
}
//---------------------------------------------------------------------------

Implementacion
Código:

void __fastcall TForm1::BitBtn5Click(TObject *Sender)
{
   Memo1->Clear();
   UnicodeString us;
   TStringList *str_rows= new TStringList();
   TStringList *str_cols= new TStringList();

   split( L'\n', Clipboard()->AsText, str_rows); //Delimitar con return char

   StringGrid1->RowCount=str_rows->Count;
   for(int j=0; j<str_rows->Count; j++){
      if(str_cols->Count>StringGrid1->ColCount){
         StringGrid1->ColCount=str_cols->Count;
         }
      split( L'\t', str_rows->Strings[j], str_cols); //Delimitar linea con tab char
      for(int i=0; i<str_cols->Count; i++){
         Memo1->Lines->Add(IntToStr(i)+","+IntToStr(j)+"="+str_cols->Strings[i]);
         StringGrid1->Cells[i][j]=str_cols->Strings[i];
         }
      }
}
//---------------------------------------------------------------------------

_________________
[code:1]//----------------Att Gabriel----------------
void Gracias(){
if (Respuesta == true){
Showmessage("Muchisimas Gracias!")
else
Showmessage("Ojala te sirva... ^_^ ");
}[/code:1]