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
I once had the same question.
The answer is that you put a file in the same folder with the ending csvt.
For example your file name is xyzdata.csv you add the file xyzdata.csvt
This one you can edit with editor for example. And in it you set the data type like this.
Integer is now the variable for the ...
A centroid is per definition a point layer and not a polygon. Therefor you need to create a new layer, which is easy as pie in QGIS 1.8 and higher versions.
Load in your polygon
Go to the menu -> Vector -> Geometry tools -> polygon centroid and create a centroid point layer
Export the coordinates of the created centroid to the attribute table by clicking on ...
To get a csv file of the attribute table, rightclick on the layer in the legend, select Save As ..., and change the file format from shapefile to CSV.
You might need to change the separator from comma to semicolon in a text editor if Excel does not like the default separator.
Many operators and functions in SQL (and therefore expressions) return NULL if one of the parameters was NULL
The following examples demonstrate the behavior of various operators on a layer with the columns A and B.
"A" + "B"
NULL + 'text' ➝ NULL
'a' + 'b' ➝ 'ab'
"A" || "B"
NULL || 'text' ➝ NULL
'a' || 'b' ➝ 'ab'
CONCAT(NULL, 'text') ➝...
I think what you might be trying to do is NOT use "fully qualified table names".
To do so, in Environment Settings -> General Setting, uncheck
"Maintain fully qualified name".
Take a look at this Esri support forum and this online help article.
Note this will work when joining DBF files but not when joining CSVs. (As a work-around you can convert ...
You can now rename a field using core ArcGIS Desktop GP tool - Alter Field (Data Management).
This tool provides the ability to rename fields or rename field
aliases for any geodatabase table or feature class.
I have not installed 10.2.1 on a virtual machine yet (was released just a day ago), but my guess is that by feature class here Esri means both ...
You can do this with the Summary Statistics (Analysis) tool. The case field parameter is what you use to "dissolve". From the above link:
case_field [case_field,...] (Optional)
The fields in the Input Table used to calculate statistics separately for each unique attribute value (or combination of attribute values when multiple fields are specified).
There is now a build in solution, called Refactor fields, you can find it in the Processing Toolbox under Vector table tools.
The as solution marked table editor plugin is no longer a working solution as it's being deprecated.
You can set the Attribute Table to be in a dock window which allows you to 'fix' to certain positions.
You can set this by going to:
Settings > Options > Data Sources > Open attribute table in a dock window
You will need to restart QGIS for this to take effect:
Now when you access the Attribute Table, it may appear at the bottom. Just drag this ...
By default the F6 key is the shortcut to open the attribute table of the layer selected in the Layers Panel in Windows.
If there is no default shortcut (which is the case in QGIS on MacOS) or you want to change the shortcut, you can go to "Settings - Configure Shortcuts" and select your own shortcut key combination.
Have a look at the "Overriding how text files are formatted" section in the help topic on Adding an ASCII or text file table:
You can override how delimited text files are displayed within ArcGIS
by using the schema.ini files. An example of when you would want to
use the schema.ini file to override the default behavior is when
ArcGIS is ...
In QGIS open your attribute table and click the "Select Features Using an Expression" button. To find all the null records for a field in a shape file your query will look like:
"field_name" is null
You can find your field name in the Fields and Values list, double click the field you want to get it into the Expression box.
Make sure you SELECT the new ...
In short you cannot change a field name in a shapefile. What you need to do is create a new field of the same type but with your new name then copy the contents of the old field into it, then delete the old field.
You can use Table Manager Plugin in QGIS to rename, delete and sort table attributes. You can try harmonize the shapefiles structure.
There is one limitation, Table manager won't be able to change attribute types. If you have an attribute that is a "text" in one shapefile and a "integer" in the other, you have to create a temporary attribute and convert the ...
I discovered the solution to this by accident a couple of weeks ago. It's so simple it's almost too good to be true:
Select the formatted cells of interest in Excel, Copy, then Paste into
an active Arcmap Layout dataframe. Size and place to suit. Done.
To ensure you don't get any jpeg jaggies use the same font size in Excel as you would in Arcmap if it ...
I think the problem is likely your two lines where you are going over the fields and appending each field individually to your subdict dictionary.
for field in valid_fields:
subdict[field] = row[cursor_fields.index(field)]
Your row object is already a tuple in the same order as your fields, take advantage of that and use the zip function.
By default CSV layers cannot be edited. You have to save to a different format, e.g. Shapefile, before you can start editing.
There's a new plugin that solves this issue called Editable GeoCSV. It can handle x and y columns for points or a WKT column. For more details see http://giswiki.hsr.ch/Editable_GeoCSV_QGIS_Plugin
In newer versions (I used QGIS 2.18.9) if you right-click on the layer -> "Save As..." you can toggle "Select fields to export and their export options". There you can select all the fields you want to export.
Optional: In the Save As-window - Scroll down to "Datasource Options", you can add the selected field name to "DescriptionField" or "NameField". For ...
You could use field calculator and follow these steps:
1- Create new field (string)
2- Use "Coalesce" Function
coalesce( "Value 1" , "Value 2" , 'value if No data')
Colaesce function returns the first not NULL
Without knowing what your data looks like, the general syntax you need to insert into the select by attributes window is:
[FIELD_1] IS NULL OR [FIELD_2] IS NULL OR [FIELD_3] IS NULL
and so on for as many fields as you have to work with. For reference the full query would be:
SELECT * FROM [TABLE_NAME] WHERE [FIELD_1] IS NULL OR [FIELD_2] IS NULL OR [...
This should do it and is a little simpler than the examples in the online help for UpdateCursor which is nevertheless worth a read.
I've assumed your shapefile is in a folder called C:\temp and that structuretype is an integer field. If it is a text field just use "3" and "4" instead of 3 and 4.
features = arcpy.UpdateCursor(r"C:\temp\...