Exporting attribute table to Excel from QGIS?

  • I have seen all the questions for how to export an attribute table to Excel from QGIS, and I try all the answers like copy paste, CSV (in fact this I do not know where to find), but none seems to be the right answer.

    Can anyone help me?

    What method have you tried for copy-paste into Excel?

    Siple copy-paste. Select all the feature, copy, open excel, select more then my feature cloumns, rows and paste. Am I right?

    Yes, select-all then copy, but don't try to select the range of cells within Excel, paste into a single cell. What error did you get?

    Many rows with a long number. In some cells the information is missing. Looks like it is not the right way? Shuold have another way that give you the column and the rows like they are in your attribute table.

  • UPDATE 13.10.2016:

    Right click on the layer in the Table of Contents (aka. legend or layer tree) and open the Save As... dialog.

    Once there, click on the Format option list and choose MS Office Open XML spreadsheet [XLSX].

    Note that you also have an option for Libre Office files: Open Document spreadsheet [ODS].

    I'm using QGIS v.2.14.4


    PREVIOUS ANSWER (still valid):

    1. Install the XY Tools plugin by Richard Duivenvoorde.

    2. Select a vector file from the ToC (that is, make it active).

    3. Go to Vector->XY tools->Save attribute table as Excel file.

    enter image description here

    You would need the Python library xlw installed for doing so.

    Yes, but I want it for free. To get XYtools you need to pay. Is there any other way?

    @PoPo You don't need to pay for using XY tools plugin, I myself use it. The author suggests you to donate 5€ if you use the plugin, but it's up to you to donate.

    Can you give me a link, please?

    @PoPo You can download the plugin from here or simply go to `Plugins->Manage and Install plugins` and search for xytools.

    Yes now I have that,but look the problem that it have An error has occured while executing Python code: Traceback (most recent call last): File "C:.qgis2/python/plugins\xytools\xytools.py", line 301, in excelSave xlw.writeAttributeRow(rowNr, values) File "C:.qgis2/python/plugins\xytools\providers\excel.py", line 51, in writeAttributeRow cell = str(cell) UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128) Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.2.0-Valmiera Valmiera, c3a2817

    @PoPo Can you try the previous version of the plugin? You can download it from here.

    It not allow me to choose the previous version, but download the lastes verison.

    Might be this issue with non-ASCII-caharcters as field values: https://github.com/rduivenvoorde/xytools/issues/3

    @PoPo You can download it from the last link I gave you, delete your current `xytools` folder in `USER/.qgis2/python/plugins/`. Then extract the downloaded zip into that location. Restart QGIS and you're done. I see there were modifications to the file `excel.py` in the latest version, and I've used the previous one without problems.

    @gcarrillo Thank you. Yes, now it's working. Thank you a lot.

    When I installed the XY Tools I found that some python library was missing from my install (osx). Not sure what it was. I voted for the CSV answer by AndreJ because ultimately that's what I wanted -- this question came up when I searched for "qgis export attribute csv". Also, because CSV is more useful than an "Excel file" because it is natively supported by any reputable spreadsheet program, including basic text editors.

    It's up to you. I still read in the title "How to export attribute table to **Excel** from QGIS?".

    This answer is a little outdated, I found the answer below to be more current.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM