Login | |
|
 |
RE: excel to array, perform functions to convert units ... - 6/30/2008 7:49:18 AM
|
|
 |
|
| |
ehvbs
Posts: 2201
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
|
you can't specify types with AS in VBScript (that's VBA lingo). I run this work code (in the context of my last Excel.Application sample code successfully: Dim iRow : iRow = 2 Dim dblNewValue Do Until "" = objSheet.Cells( iRow, 18 ) dblNewValue = objSheet.Cells( iRow, 18 ) * 55.1150 / 25 objSheet.Cells( iRow, 19 ) = dblNewValue iRow = iRow + 1 Loop WScript.Echo "iRow", iRow lawson Amount(soh) CS Amount(soh) 500 1102,3 27 59,5242 108 238,0968 108 238,0968 168 370,3728 91 200,6186 650 1432,99 50 110,23 352 776,0192 13 28,6598 60 132,276 16 35,2736 4 8,8184 10 22,046 1818,795 4009,715457 2204,6 4860,26116 2094,37 4617,248102 2204,6 4860,26116 55,115 121,506529 2204,6 4860,26116 2204,6 4860,26116 2204,6 4860,26116 2204,6 4860,26116 2204,6 4860,26116 2204,6 4860,26116 2204,6 4860,26116 1818,795 4009,715457 2204,6 4860,26116 496,035 1093,558761 2204,6 4860,26116 2204,6 4860,26116 55,115 121,506529 100 220,46 11025 24305,715 75 165,345 (sorry about the format) If this looks correct and similiar code fails for you, check whether there is something fishy with the represantation of reals (decimal point or comma, is Excel using thousand separators)
< Message edited by ehvbs -- 6/30/2008 7:54:00 AM >
|
|
| |
|
|
|
|
|