bonjour à tous,
mon problème je n'arrive pas à convertir les nombres (format anglais au format français)
| 1,510.315 | 1,397.534 | 112,563.945 | 104,158.365 | 289,062.141 | 267,476.766 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 120.000 | 111.039 | 120.000 | 111.039 |
| 0.000 | 0.000 | 1,793.753 | 1,659.807 | 2,253.753 | 2,085.457 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| 0.000 | 0.000 | 603.498 | 603.498 | 905.247 | 905.247 |
| 0.000 | 0.000 | 2,660.320 | 2,633.980 | 7,567.595 | 7,492.668 |
| 1,510.315 | 1,397.534 | 117,741.516 | 109,166.689 | 299,908.736 | 278,071.177 |
code
Sub requete()
Dim a As String
Dim DateFTS As Date
Workbooks.OpenDatabase Filename:= _
"C:\Users\hcd01usaccm\Documents\Mes sources de données\Requête - FinancialTransactionSummary.odc" _
, CommandText:=Array("SELECT * FROM [FinancialTransactionSummary]"), CommandType:=xlCmdSql _
, ImportDataAs:=xlTable
Columns("C:H").Select
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
a = Cells(180, 2).Value
DateFTS = Mid(a, 47, 2) & "/" & Mid(a, 50, 2) & "/" & Mid(a, 53, 2)
MsgBox DateFTS
End Sub
resultat obtenu
| 1 510 315 | 1 397 534 | 112 563 945 | 104 158 365 | 289 062 141 | 267 476 766 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 120 000 | 111 039 | 120 000 | 111 039 |
| 0,000 | 0,000 | 1 793 753 | 1 659 807 | 2 253 753 | 2 085 457 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 0,000 | 0,000 | 0,000 | 0,000 |
| 0,000 | 0,000 | 603 498 | 603 498 | 905 247 | 905 247 |
| 0,000 | 0,000 | 2660,32 | 2633,98 | 7 567 595 | 7 492 668 |
| 1 510 315 | 1 397 534 | 117 741 516 | 109 166 689 | 299 908 736 | 278 071 177 |
merci d'avance pour votre aide