I have a few raster datasets and I created a fishnet (polygon). I tried to add the values which the rasters have in the grid cells to the attribute Table from the polygon.
With QGIS one possible workaround is as follows. First, I created a polygon fishnet from raster layer for the following image (50 % of transparency for visualization purpose):
Afterward, with the Polygon centroids Processing tool, I created a centroids layer corresponding to the fishnet; as can be observed in following image.
Next I used the v.sample Processing tool for sampling raster values corresponding to centroids for each feature of fishnet. Sampled raster values can be observed in the Attributes Table of following image for Sampled memory layer produced.
After creating an id field in the Sampled layer, I used a Spatial join to the fishnet layer, using id as join and target field. Finally, fishnet is saved with another name and unnecessary fields (different to raster values) were deleted; as it can be observed at following image: