The problem with the conversion of DBF => XLS

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

The problem with the conversion of DBF => XLS

#1 Post by Eugene Lutsenko »

Please show me how to convert DBF file to XLS.
This code results in errors:.

Code: Select all

      CLOSE ALL
      COPY FILE ("Inp_data.dbf") TO (M_ApplsPath+"\Inp_data\Inp_data.dbf")
      USE Inp_data EXCLUSIVE NEW
      DC_WorkArea2Excel( "Inp_data.xls" )
      DC_WorkArea2Excel( M_ApplsPath+"\Inp_data\Inp_data.xls" )
Image
Image

The file itself is here:
http://lc.kubagro.ru/Dima/Inp_data.rar

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: The problem with the conversion of DBF => XLS

#2 Post by Wolfgang Ciriack »

If you don't want to manipulate the records before you give them to excel - so the whole dbf - simply reneme inp_data.dbf to inp_data.xls and open it with excel. This should work.
_______________________
Best Regards
Wolfgang

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The problem with the conversion of DBF => XLS

#3 Post by Eugene Lutsenko »

I understand that you can open in Excel dbf-file and write it as xls, but I wanted to free users (who may not know), this work

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: The problem with the conversion of DBF => XLS

#4 Post by rdonnay »

Maybe the problem is due to your version of Excel.

I can create an XLS file from your database file with no errors.
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: The problem with the conversion of DBF => XLS

#5 Post by bwolfsohn »

Eugene Lutsenko wrote:I understand that you can open in Excel dbf-file and write it as xls, but I wanted to free users (who may not know), this work
do it inside xbase

try:

COPY FILE from .dbf to .xls

then

runshell()
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: The problem with the conversion of DBF => XLS

#6 Post by messaoudlazhar »

see your DBF file it has a length incorrect of field
may be a numeric field with a field length of upper 19

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The problem with the conversion of DBF => XLS

#7 Post by Eugene Lutsenko »

messaoudlazhar wrote:see your DBF file it has a length incorrect of field
may be a numeric field with a field length of upper 19
Changed the program so that the size of the numeric fields in the source dbf-file does not exceed 19 characters, but it did not change the situation

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The problem with the conversion of DBF => XLS

#8 Post by Eugene Lutsenko »

bwolfsohn wrote:
Eugene Lutsenko wrote:I understand that you can open in Excel dbf-file and write it as xls, but I wanted to free users (who may not know), this work
do it inside xbase

try:

COPY FILE from .dbf to .xls

then

runshell()
This amazingly simple and elegant solution, which for some reason it does not reach my head, solves the problem in the case where the field names DBF-file can be used as field names Ecxel-file because are short. In this case it is enough for me. Thank you so much!

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: The problem with the conversion of DBF => XLS

#9 Post by Eugene Lutsenko »

rdonnay wrote:Maybe the problem is due to your version of Excel.

I can create an XLS file from your database file with no errors.
Can be sure that this is connected with the version of Excel. But I honestly do not think so, since some files dbf-evaluate to xls without problems, and in some this is a problem. In the examples you sent me wrong is not there. And at the same time you have the file converted to normal, to which I gave the link above?

messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: The problem with the conversion of DBF => XLS

#10 Post by messaoudlazhar »

I'm sure the problem is a problem of size of field, because I had the same problem and solved it when I adjusted the size so that it meets the standard DBF Dbase III.

Post Reply