Menu

#620 Add the SQL as an extra sheet in Excel export

SQuirreL
open
None
medium
2025-06-24
2025-02-10
JohnnyBoy
No

After exporting to Excel I always create a new sheet called "SQL" and I copy and paste the query into it and set the font to Courier New.
I would like there to be a tickbox in our Export dialog to do this with the ability to name the query sheet and the data sheet.

See attached for a screenshot of the SQL Developer Export dialog with this option for what I mean.

This is similar to this https://sourceforge.net/p/squirrel-sql/feature-requests/238/ request created in 2007 (!) but that has been forgotten in time.

The difference between the two requests is that I would like the SQL query as a separate sheet rather than as a table with the data.

1 Attachments

Discussion

  • Stepan RYBAR

    Stepan RYBAR - 2025-02-11

    Hello, please just keep in mind, that SQuirreL has a great feature, that it can export multiple ResultSets each into separate Excel Sheet both from GUI and or from SQuirreL's meta languague. So in case one want to save also SQL SELECTS (commands) into separate one sheet, there has to be solved how and where these SQLs will be saved in the output. If all commands one below another in one Sheet or each ResultSet data sheet will have its own another SQL sheet next to it. Or if SQL Command will be saved as Note or Comment... Who knows? Stepan

     
    • JohnnyBoy

      JohnnyBoy - 2025-02-14

      That is a fair point.
      However, before getting bogged down in solving all use cases together, perhaps we should do the basic case of one resultset and move onto multiple sets afterwards as a separate piece of work.

       
  • Gerd Wagner

    Gerd Wagner - 2025-02-15

    The following was implemented and will be available in future snapshots and versions:

    Excerpt from change log:

    https://sourceforge.net/p/squirrel-sql/feature-requests/620/
    MS-Excel export: Options to choose fonts for header- and other rows
    See right mouse menu of UI tables --> "Export CSV / MS Excel / XML / JSON ..."

     
    • Vikaash Mahabir

      Vikaash Mahabir - 2025-06-05

      Using snapshot 20250527_2036.

      This feature request was actually something I wanted to post today, but luckily JohnnyBoy already did!
      Now I'm wondering which option enables the tab with the SQL statement used to generate the result set when exporting to XLSX. Could you please point out to me which settings apply to this feature request?

       
  • Gerd Wagner

    Gerd Wagner - 2025-06-07

    The following was implemented and will be available in future snapshots and versions, excerpt from change log:

    '#620 Direct SQL to MS Excel exports now offers to create additional
    sheets containing the exported SQL statements.
    Note: For direct SQL exports, right mouse click an SQL statement or hit Ctrl+T --> sql2file
    or check the multiple sheet export explained in the "About Exporting" link at the bottom of the export dialog.

     
    • Stepan RYBAR

      Stepan RYBAR - 2025-06-19

      Hello, Gerd,

      I have tested this RFE and this works as I understood and expected. From my point of view this Ticket could be Closed as Implemented.

      Just few notices:

      1) I do not understand, why exporting of SQL command export is disabled for interactive Export. It could be useful as an evidence how the data were exported. Once there is such possibility, why not to allow checkbox even for interactive export.

      2) When using interactive Export window, there is no right side scroll bar. And for example now (morning) I am working on my notebook and it was almost unable to fit window on display to be able to hit OK button at the very bottom of that window. Enabling scrolling bar would be nice. The same for Preferences windows. Should I create separate task for this on Git Issue tracker?

      Thank You very much, Stepan

       

      Last edit: Stepan RYBAR 2025-06-19
  • Gerd Wagner

    Gerd Wagner - 2025-06-23

    The following was implemented and will be available in future snapshots and versions:

    Excerpt from change log:

    ' #620 UI table to MS Excel exports of SQL results now offers to create additional
    sheets containing the exported SQL statements.
    This is an extension of the original implementation of feature request 620.

     
  • Gerd Wagner

    Gerd Wagner - 2025-06-24

    Concerning the height of the export to file dialog the following was implemented and will be available in future snapshots and versions.

    Excerpt from change log:

    '#620 Equipped the file export dialog with a vertical scrollbar when needed.
    To better support this, the dialog was partly rearranged.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.