Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: Crina.candy pe Simpatie.ro
| Femeie 23 ani Harghita cauta Barbat 24 - 44 ani |
|
TRaP
Moderator
Inregistrat: acum 6 ani
Postari: 787
|
|
The code from source is easily adapted.
The problem in my case was converting the value from SAP table to Excel formatted number, with . as thousands separator and , as decimals separator. SAP, in my case, has the exact separators I need, however importing the value in Excel either created a value stored as text, or removed the , decimal separator altogether and resulted in a number 1000 times bigger.
The solution was to properly declare a variable and store the .getCellValue result in it. The format it should be declared as is Double (since Integer obviously removes decimals, and Long apparently also removes decimals). Not declaring at all - which I did in the first place - stored the value as String.
Dim tbl As Object Dim tmp_value as Double Set tbl = SAP_session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell") tmp_value = tbl.getCellValue(.RowCount - 1, "ERFMG") ActiveCell.Value = tmp_value
|
Source: Post from source:
|
|
pus acum 1 an |
|