Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export/copy to Excel Problem

Status
Not open for further replies.

schniesich

Technical User
Jul 28, 2005
11
DE
Hi,
when opening a *.dbf file in Excel the german "Umlaute" (special characters like ä in HTML) are not shown properly.

When using the EXPORT or COPY TO ... XLS function the german "Umlaute" are ok, but the dates have a format like "01-May-1999" which can not be used well in Excel.

Has anyone an idea how to get the german "Umlaute" and the date-format to be shown properly?

Thanks
 
Try different date settings.
Like SET DATE AMERICAN for instance.
Here are some examples:
Code:
AMERICAN         mm/dd/yy
ANSI             yy.mm.dd
BRITISH/FRENCH   dd/mm/yy
GERMAN           dd.mm.yy
ITALIAN          dd-mm-yy
JAPAN            yy/mm/dd
USA              mm-dd-yy
MDY              mm/dd/yy
DMY              dd/mm/yy
YMD              yy/mm/dd

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thank you for your soon reply,
but that won't work. In the "global" settings I have set the date to german and now after your tip I also tried some different date settings in the code but I get always the same result after copy to/export the date looks like this: 01-May-99 (???). OK, if seleting "type xls" (have no xl5 since I only have FoxPro 2.6). If selecting e.g. "type delimited" the output date looks different: 19990501.
It look like no matter what I am setting in "SET DATE TO" FoxPro always uses it's own format during copy to/export. Is there a way of customizing this behaviour?

Thanks
 
Your problem seems to be how you set the representation of the date cells in Excel. You can change this with Format, Cells, date etc.

I have no problems when copying 2 dates from Foxpro 2.6 to an Excel file and doing mathematics such as date1 - date2.

You could look at Julian dates SYS(1) in Fox 2.6, and Excel also handles Julian dates.

 
Hello,

thanks for the help. Since it seems not to be possible export a table to Excel with having the german "Umlaute" and the date in proper format I decided to proceed as follows: I use copy to type delimited with tabs to a *.txt file (that gives me the correct "Umlaute" and the date in a format that can be set in Excel (YYYYMMDD). When opening that txt-file with Excel the Import-dialog will offer the possibility to assign the date to "YMD" and telephone-no. starting with a zero to "text" (so that the leading zero is not lost).

That's almost what I wanted! Thanks again...
 

Check out this, as it may have some 'German' solutions.
ftp://ftp.prolib.de/public/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top