Page 1 of 2

The problem with the conversion of DBF => XLS

Posted: Thu Apr 03, 2014 7:25 am
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

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

Posted: Thu Apr 03, 2014 9:05 am
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.

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

Posted: Thu Apr 03, 2014 10:57 am
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

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

Posted: Thu Apr 03, 2014 11:45 am
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.

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

Posted: Thu Apr 03, 2014 1:16 pm
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()

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

Posted: Fri Apr 04, 2014 12:17 am
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

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

Posted: Sat Apr 05, 2014 6:36 pm
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

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

Posted: Sat Apr 05, 2014 6:39 pm
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!

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

Posted: Sat Apr 05, 2014 7:16 pm
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?

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

Posted: Mon Apr 07, 2014 12:29 pm
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.