Index: tol/contrib/excel/tolExcel.cpp
===================================================================
--- tol/contrib/excel/tolExcel.cpp	(revision 26e0c376a4d2a88e54aeefc52ceee2019f77b779)
+++ tol/contrib/excel/tolExcel.cpp	(revision eb2b9ddb8089e9b6473d85543bf20ef0a3dac61e)
@@ -398,5 +398,4 @@
   }
 #endif
-  assert( cell );
   if ( cell ) {
     CellFormat fmt( *m_ptrFmtMgr, cell );
@@ -422,7 +421,9 @@
         snprintf( cell_coord, 64, "(%d,%d)", row, col );        
         Warning( err_name + ": " +
-                 I2("don't know how to interpret the result in cell ",
+                 I2("don't know how to interpret the result in cell formula ",
                     "no se como interpretar el resultado en la celda " ) + cell_coord );
-        result = new BContensText( "" );
+        // OJO: aqui hay que retornar NULL y dejar que el que llama tome la decision.
+        result = NULL;
+        //result = new BContensText( "" );
       }
       break;
@@ -434,5 +435,6 @@
                   "no se que hacer con la celda " ) + cell_coord );
 #endif
-      result = new BContensText( "" );
+      result = NULL;
+      // result = new BContensText( "" );
     }
   }
@@ -784,6 +786,7 @@
 //---------------------------------------------------------------------------
 DeclareContensClass(BSet, BSetTemporary, BSetExcelReadRange);
-DefExtOpr(1, BSetExcelReadRange, "Excel.ReadRange", 3, 3, "Real Anything Anything",
-          "(Real ExcelHandler, Anything CornerLT, Anything CornerRB)",
+DefExtOpr(1, BSetExcelReadRange, "Excel.ReadRange", 3, 4,
+          "Real Anything Anything Set",
+          "(Real ExcelHandler, Anything CornerLT, Anything CornerRB [,Set ColumnTypes])",
           I2("Return the contents of the cells contained given cell's range. "
              "The cell corners delimiting the range can be given as Text or "
@@ -807,4 +810,6 @@
     // bool status1 = ;
     // bool status2 = ;
+    BSet *ptrArgs = NULL; 
+
     if ( TolExcel::getCellCoordinates( _name_, cornerLT, r0, c0 ) &&
          TolExcel::getCellCoordinates( _name_, cornerBR, r1, c1 ) ) {
@@ -812,4 +817,27 @@
       BList*	aux    = NIL;
       size_t	r,c;
+      size_t    numColumns = c1 - c0 + 1;
+      if ( NumArgs() > 3 ) {
+        ptrArgs = &Set( Arg( 4 ) );
+        if ( numColumns == ptrArgs->Card() ) {
+          for ( c = 1; c <= ptrArgs->Card(); c++ ) {
+            BGrammar *grammar = (*ptrArgs)[c]->Grammar();
+            if ( grammar != GraText() &&
+                 grammar != GraReal() &&
+                 grammar != GraDate() ) {
+              Warning( _name_ + ": " +
+                       "Invalid type in column type specification, only Real, Date or Text is returned from excel" );
+              ptrArgs = NULL;
+              break;
+            }
+          }
+        } else {
+          char buffer[256];
+          snprintf( buffer, 256, "Expecting %d columns (%d,%d)", numColumns, c0, c1 );
+          Warning( _name_ + ": " +
+                   "The number of column's types does not match the number of columns. " + buffer);
+          ptrArgs = NULL;
+        }
+      }
       for( r = r0; r <= r1; r++ ) {
 	BList* lsta	  = NIL;
@@ -817,6 +845,8 @@
 	for( c = c0; c <= c1; c++ ) {
           BSyntaxObject *cellValue = xls->GetCellAnything( _name_, r, c );
+          // OJO: aqui hay que rellenar con el omitido segun el tipo de columna
           if ( !cellValue ) {
-            cellValue = new BContensText( "" );
+            cellValue = ptrArgs ? ((*ptrArgs)[c-c0+1])->CopyContens() :
+              new BContensText( "" );
           }
           LstFastAppend( lsta, auxa, cellValue );
@@ -861,6 +891,10 @@
                     "direccion de objecto excel invalido") );
           return NULL;
-        }    
+        }
+        // OJO, puede venir NULL
         result = xls->GetCellAnything( _name_, i_row, i_col );
+        if ( !result ) {
+          result = new BContensText( "" );
+        }
       }
     }
