... will convert numbers to numbers, but there are times that numbers are (product codes) and need to be Char. With OLE and functions like Set( "NumberFormat", '0.00' ) I can do this... looking for more samples at the moment..... I found small samples like this, but they look more complex... ...
... these two lines as below: oRange:Rows( 1 ):Value := aHead AEval( Eval( bLine ), { |u,i| If( ValType( u ) == "C", oRange:Columns( i ):NumberFormat := "@", nil ) } ) nRow := 2 Please let us know if this resolves your issue.
... estoy creando, al final para dar formato a los campos numericos doy: oSheet:Range("A1:H"+Alltrim(Str(oSheet:UsedRange:Rows:Count()))):NumberFormat:="###,##0.00" y las cifras me la pone: -4615952,98 cuendo es -4,615,952.98 4219371,98 4.219,371.98 -396581 -396,581.00 alguna ...
Indico el Numero de la columna para que el solo haga el incremento por la linea (dejo fijo la columna 3, y hace el incremento por linea), ya intente con el numberformat pero eso sirve solamente para convertir la columna a formato numerico (no para convertirla a formato texto)
Enrico Can you try something like this ? oSheet:Range( "A:A" ):Set( "NumberFormat", '00/00/00' ) // field mask// sets headersoSheet:Cells( 1, 1 ):value := "Date".........Do while ... ...
As of now there is no way except review all our code and modify wherever dates are assigned. oSheet:Cells(r,c):NumberFormat := "dd-mm-yyyy" // or similar oSheet:Cells(r,c):Value := If( Year(d) < 1900, nil, d ) I prefer oSheet:Cells(r,c):Value := If( Year(d) < 1900, ...
... an Excel file with Office 2013, I have no problem with previous versions, in all previous cases put the following line: oSheet: Cells (NFIL, 6): NumberFormat: = "#, ## 0.00" And I format the cell with "," as thousand separator, with "." as decimal point and 2 decimal ...
... Office 2013, problema que no tengo con las versiones anteriores, en todos los casos anteriores coloco la siguiente linea : oHoja :Cells( nFil, 6 ):NumberFormat := "#,##0.00" Y me formatea la celda con "," como separador de miles, con "." como indicador decimal y con ...