I am using QGIS. I opened my attribute table in Open Office Calc and sorted the table by a column. I believe I had all the columns selected when I sorted. Now when viewing the layer, everything is screwed up with wrong attributes.

Is it not a good idea to sort the table?

Is there a way to revert back?

  • 4
    In shapefile the first geometry that is stored to the .shp part is connected with the first row of the .dbf part, second feature with the secod row and so on. Sorting the .dbf with an external program is definitely a bad idea.
    – user30184
    Commented Mar 20, 2019 at 21:57

1 Answer 1


I suppose you opened a .dbf belonging to a shapefile? Opening such a table with another program than gis-software can screw up your file!

If you do not have a backup, I fear your data is lost ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.