I have a big spatial dataset file that I need to import to the QGIS to get the temperature data from each grid. However, the dataset file is in the format of having longitude as first row, latitude as first column. And the temperature data is in the format of a 2D matrix.
To import this into QGIS as a point shapefile, you need each unique point to be its own row in the spreadsheet.
So you should convert this:
With n different latitudes and longitudes, your end result has n-squared lines. (In my example, n=5 so there are 25 lines in the second sheet.) Then you import the new spreadsheet and each line of the new spreadsheet becomes a point in QGIS. In my example, the original 2-D table is Sheet1 and the 1-D table is Sheet2 in the same Excel workbook. In the next image, I've removed the equals sign from each cell formula so you can see the formulas I used.
EDIT: It probably makes more sense to display this information in raster format. Use the rasterize tool to convert from a vector to a raster.
If this single file have to be converted to QGIS, change it manually into an ESRI ASCII GRID. Remove the first row and the first column in libre/open office calc, save as data into a csv file. The separator should be space in the grid file (extension .grd). Add manually the header information to the file:
ncols 180 nrows 90 xllcorner -179 yllcorner -89 cellsize 2 nodata_value -9999 0.20 0.20 0.20 .... ...
I hope I guess the number of columns and rows well. Open this file as a raster (Arc/info ASCII GRID) in QGIS.