To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=74021
                 Issue #|74021
                 Summary|Can't import value from csv as value can import it onl
                        |y as text
               Component|Spreadsheet
                 Version|OOo 2.0.4
                Platform|Opteron/x86_64
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|open-import
             Assigned to|spreadsheet
             Reported by|aorco





------- Additional comments from [EMAIL PROTECTED] Tue Jan 30 06:21:11 -0800 
2007 -------
I've wrote a macro that open a csv containing numbers in a calc spreadsheet and
should import that number in the cell in my spreadshet where i wrote the
function name.

The same macro work correctrly on OOo 2.1 on x86 Linux and OOo 2.0.4 on Windows
XP. On Debian testing/Etch amd64 the macro fail.

If i try to import the number with (dvar is defined as double):

dVar = oSheet.getCellByPosition(0,0).getValue()
FunctionName = dVar

It fail. If i do 
print oSheet.getCellByPosition(0,0).getValue()
the program give me a value like: 4,065645XXXXE-324 

If i try to import it with (svar is defined as string) 

sVar = oSheet.getCellByPosition(0,0).getString()
FunctionName = sVar

the function return me the number but i can't use it as number. For ex: the
function return in A1 15, in A2 i write =A1+1 and the result is 1, not 16
An example can be downloaded from here:
http://mogoshare.com/932857

the code of the macro is:

Function GetPrices()

  Dim sDir As String 'Percorso del filei
  Dim oCalcSheet
  Dim oSheet
  Dim oArgs(1) As New com.sun.star.beans.PropertyValue
  sDir="e:\eMule_Incoming\prova.csv"
  
  oArgs(0).Name = "FilterName"
  oArgs(0).Value = "Text - txt - csv (StarCalc)"
  oArgs(1).Name = "FilterOptions"
  oArgs(1).Value = "44,34,76,1"
  
  oCalcSheet = StarDesktop.loadComponentFromURL(ConvertToURL(sDir), "_blank",
0,oArgs())
  oSheet  =oCalcSheet.getSheets().getByIndex( 0 )

  print oSheet.getCellByPosition(0,0).getValue()

  GetPrices = oSheet.getCellByPosition(0,0).getValue()  
End Function

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to