xbrowse function toCalc

xbrowse function toCalc

Postby damianodec » Mon Nov 05, 2018 2:57 pm

hi,
I have this xbrowse:
Image
I try to export in Excel(obrw:toexcel) and OpenOffice (oBrw:tcalc()).

in Excel it's ok:
Image

but in Calc I get this:
Image

column ARTICOLO become Numeric rounded.

any help?

thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse function toCalc

Postby anserkk » Wed Nov 07, 2018 5:09 am

I tested the following code and found that I am getting the right result in Calc
Code: Select all  Expand view
#Include "Fivewin.ch"
//---------------------------------------------
Function Main()
    Local oDlg,oBrw,aData,oBar
   
    aData:={ {"F305", "73.0024.61,7", 368 } }
   
    DEFINE DIALOG oDlg TITLE "Test ToCalc" SIZE 350,200 PIXEL TRUEPIXEL
   
       @50,01 XBROWSE oBrw SIZE -0,-0 PIXEL OF oDlg STYLE 2013 UPDATE  ;        
        DATASOURCE aData ;
        COLUMNS 1,2,3  ;
        HEADERS "CD.PIANIFICIAZONE", "ARTICOLO" , "RESIDUO" ;
        CELL LINES FOOTERS AUTOSORT NOBORDER
       
        WITH OBJECT oBrw
            :CreateFromCode()   
        END        
       
       DEFINE BUTTONBAR oBar OF oBrw:oWnd SIZE 56,44 2013      
       
       DEFINE BUTTON OF oBar ;
          PROMPT "Excel" ;
          ACTION ( oBrw:ToExcel() )        
         
       DEFINE BUTTON OF oBar ;
          PROMPT "Calc" ;
          ACTION ( oBrw:ToCalc() )              
   
    ACTIVATE DIALOG oDlg CENTERED

Return NIL


Tested using OpenOffice 3.1.0
Image

Calc Result
Image

openOffice Version
Image
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: xbrowse function toCalc

Postby damianodec » Tue Nov 13, 2018 11:49 am

thank you anserkk, I'll try your example
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests