el codigo es este:
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data
Source=" + txtFile.Text.Trim() + ";" + "Extended Properties=Excel 8.0;";
DbProviderFactory factory =
DbProviderFactories.GetFactory("System.Data.OleDb");
using (DbConnection connection = factory.CreateConnection())
{
connection.ConnectionString = connectionString;
using (DbCommand command = connection.CreateCommand())
{
command.CommandText = "SELECT * FROM [Sheet1$]";
connection.Open();
using (DbDataReader dr = command.ExecuteReader())
{
while (dr.Read())
{
if (!String.IsNullOrEmpty(dr[0].ToString()))
{
string idUsuario = dr[0].ToString();
string tipoPack = dr[1].ToString();
string marca = dr[2].ToString();
string modelo = dr[3].ToString();
string subtitulo = dr[4].ToString();
.........
}
}
}
}
}
No creo tener nada raro...
2010/7/3 Leonardo Micheloni <[email protected]>
> tenés el ejemplo del código?
>
> 2010/7/2 Leandro Halfon <[email protected]>:
> > Lista...estoy leyendo con OLEDB un archivo excel, y por alguna razon en
> > algunos campos no me lee todos el texto completo.
> > Probe de pasar todas las celdas a formato texto y el proble sigue...
> >
> >
> > alguna sugerencia?
> >
> >
> > Gracias!
> >
>
>