This discussion is archived
2 Replies Latest reply: Mar 12, 2012 6:03 PM by Gary Graham RSS

Excel Export File Questions

922660 Newbie
Currently Being Moderated
This is my first time posting on here. Please forgive me if I missed some of the rules.

I'm running SQL Developer 3.1.07. When I export results of a query to Microsoft Excel (right click in the result set in SQL Developer, select export, when the export wizard opens, I select the XLSX option) the data formatted as number has the "Dialog" font while data formatted as text has the "Calibri" font. I'm wondering if there is a way to change this so that they all export in the same font.

I'm also wondering if there is a way to have SQL Developer export the comments I have in my query along with the data when I specify to create a tab in my workbook with the query in it. By default, it just puts a carriage return where I had comments. Not a huge issue, but when I go back and look at old files, it would be nice to also have the comments I had written in the original query.

Thank you all in advance for your help. If I can clarify anything, let me know.
  • 1. Re: Excel Export File Questions
    Gary Graham Expert
    Currently Being Moderated
    Hi,

    If your comments appear within the query (not above or below it) and are enclosed in /* */ (not prefixed with --), then they will appear in the query's worksheet.

    Regarding font formatting, Microsoft provides a mechanism for setting the default:
    http://office.microsoft.com/en-us/excel-help/change-the-default-font-in-excel-HP001216422.aspx

    The only problem is, SQL Developer does not do a very good job of respecting the default settings. For example:
    1. After switching to Arial, a new workbook opened initially with Excel 2007 renders both numbers and letters in Arial.
    2. After switching to Arial, a SQL Developer export to .xls (then open in Excel) renders numbers in Dialog and letters in Arial.
    3. After switching to Arial, a SQL Developer export to .xlsx (then open in Excel) renders numbers in Dialog and letters in Calibri.

    This seems to be a good candidate for a feature request on SQL Developer Exchange.

    Regards,
    Gary
    SQL Developer Team
  • 2. Re: Excel Export File Questions
    Gary Graham Expert
    Currently Being Moderated
    To clarify and correct my comments about default font settings -

    1. SQL Developer uses the java.awt.Font defaults of (DIALOG, PLAIN, 12) when it calls the API that writes out the Excel files
    2. How a specific version of Excel displays a file with such defaults (plus any user adjustments to the Excel options) is its business.

    So, again, a feature request on our Exchange for a Font/Style/Size preference would make sense.

    -Gary

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points