Question: First let me say that I am novice in GIS department. As archaeologist I had only some courses 8 years back when i was still studying.

Now, the problem:

When I try to import .asc as raster layer I get this message:

> 
> ngridded dataset: At line 3, X spacing was 0.000000. Expected >0 value
> 
> 
> 

I know this is a problem because "Cells with same Y coordinates must be placed on consecutive lines"

But my format viewed in Notepad++ is like this:

```
426000.78;55000.15;562.24 
426000.78;55001.15;562.22 
426000.78;55002.15;562.20
426000.78;55003.15;562.30
426000.78;55004.15;562.21
426000.78;55005.15;562.21
426000.78;55006.15;562.27

```

And my question - How do I change it to readable format. Any quick solutions?

Answer: 
The quickest solution would be to load the data into LibreOffice Calc, and sort the data on the second column, then the first one ascending. The result should look like:

```
426000.78;55000.15;562.24 
426001.78;55000.15;562.22 
426002.78;55000.15;562.20
426003.78;55000.15;562.30
426004.78;55000.15;562.21
426005.78;55000.15;562.21
426006.78;55000.15;562.27
....
426000.78;55001.15;562.96
426001.78;55001.15;562.22 

```

Saving to csv should give you the right format for GDAL.

See <http://www.gdal.org/frmt_xyz.html> for more details.

---

**UPDATE**

Looking at the whole dataset, your grid has no constant cell size, maybe due to reprojection from another CRS.

So your only chance to use the data is to round the data to full meter cell size, or import it as delimited text point layer, then run `Raster -> Interpolation -> Interpolation` on it.
This is an old question but I just ran into this same problem with the same dataset.

I just want to mention that problem here:

> 
> UPDATE
> 
> 
> Looking at the whole dataset, your grid has no constant cell size, maybe due to > > reprojection from another CRS.
> 
> 
> 

Is easily resolved by rounding all the X/Y values to the nearest decimeter. 

I did this in R:

```
library(tidyverse)
read_delim("GK1_426_55.asc", delim=";", col_names=FALSE)  %>% 
  transmute(X=round(X1, 1),
            Y=round(X2, 1),
            Z=X3) %>% 
  arrange(Y, X) %>% 
  write_delim(path="GK1_426_55_fixed.asc", delim=";")

```

Afterwards GDAL/QGIS has no problem reading it. You just need to give it the CRS.