camptocamp / QGIS-SpreadSheetLayers

QGIS plugin to load layers from spreadsheet files (*.ods, *.xls, *.xlsx)
GNU General Public License v3.0
21 stars 7 forks source link

Edits on filtered dataset deletes records permanently #45

Open thymaro opened 1 year ago

thymaro commented 1 year ago

Steps

  1. make excel spreadsheet with x and y column
  2. install plugin in QGIS
  3. import spreadsheet
  4. filter layer from spreadsheet
  5. go into edit mode and edit features, save a. the edited records get updated in the source file b. the records that are filtered out in QGIS get deleted in the excel source file c. the filtered out records are also not visible in QGIS, of course

Can you check whether this happens on your system, too? If not, I will try to go into more detail about what I did to provoke this behavior.

julsbreakdown commented 1 year ago

What version of QGIS are you using, can you provide me a sample of the excel file you are using.

arnaud-morvan commented 1 year ago

This behavior is not caused by the plugin.

The scope of the plugin is just to create a OGR/GDAL VRT file and load it in QGIS using OGR provider.

I suppose you can reproduce this behavior by creating a VRT file and loading it manually in QGIS.

thymaro commented 1 year ago

I'll make a mock excel file, but this will take some time. I'll keep this e-mail and report back on another day.

The problem might not be caused by the plugin itself, but the plugin helps in creating the problem, as the excel file experiences changes induced by QGIS with the help of the plugin, which creates the VRT and simplifies the possibility to create a more-or-less direct link between excel files and QGIS.

arnaud-morvan commented 1 year ago

Maybe we could add a warning somewhere in the dialog. But we have no possibility to fix this on the plugin side which is just a dialog to create a text file.

thymaro commented 1 year ago

Adding a warning in the sorts of "Do not filter your dataset, or the filtered records will be permanently deleted in the source file upon saving. We cannot do anything about this on the plugin site. Please be careful." would be ok. If anybody else is like me, though, they'll need a periodical reminder about this fact. I don't know where best to incorporate the message so it occasionally pops up at user.