Description: Scriptforge ImportFromDatabase method from the SFDocuments.Calc service, should allow to decide if the imported data has a header with the fields names or not Steps to Reproduce: If use the ImportFromDatabase method from the SFDocuments.Calc service it is obtained a table data with the result of the sqlcommand, but the table always has a header with the fields name. The table header can be a problem if the result is going to be appended to previous results, so my request is to add the possibility of obtain the results with or without the header Actual Results: Always the header is imported Expected Results: The possibility to decide if the imported table has header or not Reproducible: Always User Profile Reset: No Additional Info: Version: 25.2.0.3 (X86_64) / LibreOffice Community Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: es-ES Calc: CL threaded
Thanks for asking. Having the option of importing data with or without a header row is very relevant. However, ScriptForge uses internally the doImport() method available from the com.sun.star.util.XImportable interface. This method takes an import descriptor as argument. The import descriptor looks like this: (0)| Structure : com.sun.star.beans.PropertyValue --> DatabaseName "" (1)| Structure : com.sun.star.beans.PropertyValue --> SourceType 0 (2)| Structure : com.sun.star.beans.PropertyValue --> SourceObject "" (3)| Structure : com.sun.star.beans.PropertyValue --> IsNative True It does not contain any option about the row header. A workaround is to delete the row containing the header after the import. ScriptForge won't do that by itself because the import does not impact areas external to the imported data. The header row might still contain older data left or right of the import zone. I change the status of this bug to WONTFIX. To post a request for a broader import descriptor, please open another bug. Anyway, thanks for the suggestion.