xBrowse: Avoid long numbers converted to scientific notation

xBrowse: Avoid long numbers converted to scientific notation

Postby hua » Sat May 02, 2020 8:18 pm

Hi,
I have a col with long numbers, e.g. 119200075708
After exporting to excel from xbrowser, it ends up as 1.192E+11
How to prevent that from happening?

Image


TIA

p.s. I just noticed all the numbers in "Inv Num." column are converted to 1.192E+11
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1038
Joined: Fri Oct 28, 2005 2:27 am

Re: xBrowse: Avoid long numbers converted to scientific notation

Postby nageswaragunupudi » Sun May 03, 2020 7:55 am

Is this a browse from Array or DBF?

For now, please do this.
Have a function like this
Code: Select all  Expand view

function myexcel( oBrw )
      local oSheet
      oSheet := oBrw:ToExcel()
      oSheet:Columns( 1 ):NumberFormat := "#########"
      return nil
 


Instead of calling oBrw:ToExcel(), please call myexcel( oBrw )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse: Avoid long numbers converted to scientific notation

Postby hua » Sun May 03, 2020 12:46 pm

nageswaragunupudi wrote:Is this a browse from Array or DBF?

From an array which gets its contents from a csv file

For now, please do this.
Have a function like this
Code: Select all  Expand view

function myexcel( oBrw )
      local oSheet
      oSheet := oBrw:ToExcel()
      oSheet:Columns( 1 ):NumberFormat := "#########"
      return nil
 


Instead of calling oBrw:ToExcel(), please call myexcel( oBrw )


It works!
Thanks Rao!
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1038
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests