Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls.xls
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls.xls
I would like to receive the following result. If you convert xls to dbf, and then back to the dbf to xls, then the source and destination xls files must be identical.
Inp_xls.xls => Inp_xls.dbf => Out_xls.xls
Out_xls.xls === Inp_xls.xls
I tried to do it, but for some reason the final xls-file is not written with the name "Out_xls.xls"
Example here. Roger text functions have not changed.
http://lc.kubagro.ru/Dima/xls-dbf-xls.rar
Inp_xls.xls => Inp_xls.dbf => Out_xls.xls
Out_xls.xls === Inp_xls.xls
I tried to do it, but for some reason the final xls-file is not written with the name "Out_xls.xls"
Example here. Roger text functions have not changed.
http://lc.kubagro.ru/Dima/xls-dbf-xls.rar
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
This will take some time to figure out.
I'm travelling this week and I have a heavy work schedule.
Maybe someone on this forum can help you.
I'm travelling this week and I have a heavy work schedule.
Maybe someone on this forum can help you.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
I'm happy for you, Roger! I wish you a pleasant journey and happy returning!
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
Anybody can convert xls in dbf and back so that the result was the same file that was?
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
Xbase++ User are working with DBF not with XLS.
if you want to work with XLS you have to learn EXCEL or ask in EXCEL-Forum ...
if you want to work with XLS you have to learn EXCEL or ask in EXCEL-Forum ...
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
I know how to use Excel. And I know that Alaska is working with DBF. But I think that one does not interfere. I just need some results of the system, written in Alaska, for users to submit to the XLS-files. I can do it, but somehow ugly.Auge_Ohr wrote:Xbase++ User are working with DBF not with XLS.
if you want to work with XLS you have to learn EXCEL or ask in EXCEL-Forum ...
http://lc.kubagro.ru/Dima/xls-dbf-xls.rar
I want to be able to do it better. That's why I asked about it on this forum.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
You can simply open every .DBF with Excel, if you rename the .Dbf in .xls.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
It's you I've reported before. Works fine. But the fact is that I would like to generate the column headings in the xls-file does not match with the names of the fields. I gave an example http://lc.kubagro.ru/Dima/xls-dbf-xls.rar of how I wanted to do it. The idea is to download the xls-file in dbf, process it in the program on the desired algorithm and then write it back again in the in xls-file. Thus it is necessary to use the names of columns and rows, that were in xls-file.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
So then build your own function, f.e.
Code: Select all
oExcel:= CreateObject( "EXCEL.APPLICATION" )
IF !( oExcel == NIL )
oWorkBook := oExcel:workbooks:open(v_datei)
aValues := oWorkBook:workSheets(1):usedRange:value
l:=len(aValues)
** NIL -Values entfernen
for i:=1 to l
for ii:=1 to len(aValues[i])
if aValues[i][ii]=NIL
aValues[i][ii]:=""
endif
next
next
oWorkBook:close()
sleep(100)
oExcel:quit()
oExcel:destroy()
oWorkBook:=nil
oExcel:=nil
*** all Data are now in aValues and you can
*** put Array-Data to dbf
for i:=1 to l
if i=1
** header colums
aHeaders:=aValues[i]
else
** data
** convert Data of fields to the disired format
f1:=ConvXls("C",aValues[i][1])
.....
endif
next
endif
**************************************
function ConvXls(zutyp, xwert)
local retw:=xwert, isttyp:=ValType(xwert)
do case
case zutyp==isttyp
retw:=xwert
case zutyp="C"
if isttyp="N"
retw:=alltrim(str(xwert,10,0))
elseif isttyp="D"
retw:=dtoc(xwert)
endif
case zutyp="D"
if isttyp="N"
retw:=blank(date())
elseif isttyp="C"
retw:=ctod(xwert)
endif
case zutyp="N"
if isttyp="C"
retw:=val(alltrim(xwert))
elseif isttyp="D"
retw:=0
endif
endcase
return retw
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Inp_xls.xls=Inp_xls.dbf=>Out_xls.xls:Out_xls.xls=Inp_xls
Look at 'User Contributions' topic 'Importing Excel to Dbf'.
You might get some ideas.
http://bb.donnay-software.com/donnay/vi ... ?f=7&t=238
You might get some ideas.
http://bb.donnay-software.com/donnay/vi ... ?f=7&t=238