Apache OpenOffice (AOO) Bugzilla – Issue 64221
undesidered characters while Importing .DBF file
Last modified: 2006-04-11 08:02:49 UTC
This bug occurs when importing a .dbf file; I can see a " ' " character before every value in every cell. I saw this using neooffice that is OOo 1.1 based on. Fabri
Hi, is the field used defined as Textfield ? Please attach a DBF file showing this behaviour. Thanks Frank
I added dbf. and .sxc files
Created attachment 35615 [details] dbf file
Created attachment 35616 [details] .sxc file
Hi, this is not a bug. The table structure of the dbf file for all the fields containing leading apostrophes say they are characters. This can easily seen if you import the DBF file and look at the first row. All columns have a header defining it. C is for characters (text), N would be nummeric. So Calc imports the values correctly as Characters. As the numberformat for the default template is set to nummeric, a apostrophe is placed in front of the value to make it a text. To change such text values to real nummeric values, you have two choices. 1.) Change the field setting in the DBF from C to N and re-import the file or 2.) use the Search and replace functionality. Open the search and replace dialog and enter '.*' (without the quotes) into the search field. Type '&' (also without quotes) into the replace field. Now press on the More Button and tag the option Regular expression. Click on replace all and all the apostrophes should be gone. For more information about regular expressions use the help system please. Frank
closed invalid