FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GetExcelRange : Enhancement request
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
GetExcelRange : Enhancement request
Posted: Sun Apr 18, 2021 08:28 AM

oRange := GetExcelRange( cCurfile , NIL )

Is it possible to enhance this function to be able to convert the exel data the way we want it at time of reading the file ?

As we know, if the exel file has nummes, it will put a extra .00 behind it. For really number (prices, ...) this is ok but I
notice that several exel files that I receive from my brands from other companys the issue is with the field that is used for the 'Code' = reference for article
In mixed use the function also put a .00 behind it.

Code

Shoes1 ok
Shoes2 ok
510.10.00 extra .00
125 extra .00
136 extra .00

Can we put a extra array insite the function that we can say 'These colums MUST be read as Text'

I could do the folowing then :

Read the first time with the function and retrieve the fieldnames. Vieuw them from a xbrowse and determent wich fields should be read as text (alter the array flag of header ?)
The read a second time with the changed array and retrieve what i need.

I know that changing the Exel file from digits to txt would work, but as we know FW, We should be abla to convert without changing source data.

I hope this can be in the TODO list because this is the only strugeling point I now have in my converter program.

Thanks...

btW. Maybe a better solution is possible

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: GetExcelRange : Enhancement request
Posted: Sun Apr 18, 2021 09:48 AM

Maybe a simpler solution could be to only use a extra parameter as a flag to convert ALL fields to text ?

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: GetExcelRange : Enhancement request
Posted: Sun Apr 18, 2021 03:57 PM
This function has nothing to do with any values.
It just returns the Range Object.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion