12 Replies Latest reply on Nov 13, 2015 12:56 AM by 1012489

    Unable to export file in .xlsx format from SQL developer

    3034645

      I am trying to export my results to excel file and it says 'Save As target C:\Users\Desktop\dump\testSQL is not writable.'. I am having admin access to the machine that i am using so access shouldn't be an problem. To the same path i am able to export the data in .csv format. If some one have come accross a similar issue kindly help me to resolve it.

       

      Regards,

      Pradeep ES

        • 1. Re: Unable to export file in .xlsx format from SQL developer
          Gary Graham-Oracle

          Are you sure you to want to write to that folder?

           

          Windows will only let me create files under C:\Users\Public\Desktop if I start the CMD console (or other application) as Administrator (do not use Open, use Run as Administrator even if your user is in the Administrator group).  So I would try running SQL Developer as Administrator, or write to some other folder not subject to Windows UAC privileges. 

          • 2. Re: Unable to export file in .xlsx format from SQL developer
            3034645

            Hi Gary,

            Thanks for your response. Even though i open the SQL Developer in Run as Administrator mode it shows me the same error. The problem occurs only if i export as excel document ,other formats of export are working fine without any issues.

             

            Please help!

             

            Thanks,

            Pradeep ES

            • 3. Re: Unable to export file in .xlsx format from SQL developer
              thatJeffSmith-Oracle

              can you write to any other directory?

              • 4. Re: Unable to export file in .xlsx format from SQL developer
                3034645

                I have tried but no luck. Please help.

                • 5. Re: Unable to export file in .xlsx format from SQL developer
                  thatJeffSmith-Oracle

                  ok, start from the beginning. tell us EVERYTHING about your environment. version of sqldev, version of oracle, OS, database, the query you are using to test the XLSX export. whether or not XLS export works...

                  • 6. Re: Unable to export file in .xlsx format from SQL developer
                    1012489

                    I face the exact same issue. When trying to export data to an xls/xlsx, SQL developer throws the following error:

                     

                      Validation Failed : Save as target c:\users\310001\Desktop\tmp\t01 is not writable.

                     

                    The error occurs for both export formats : xlsx and xls. I was using the 'right click on result - then export'.

                    I am using SQL Developer ver 4.0.3 on Windows 7 (32 bit).

                     

                    This was working perfectly fine till a day ago.

                     

                    Tried a couple of things with no success:

                         - Getting the SQL Developer ver 4.1.2.

                         - Getting the updated JDK release installed and updating SQL developer to point to this JDK.

                         - Machine was restarted as well after the above efforts did not succeed.

                     

                    I am able to generate other kinds of exports (csv, txt) in the same location using SQL Developer.

                    When i change the extension of the export to something else (say xls export to a file with the extension 'xlsa') - the error is not prompted. The xls file looks good that is then generated. The xlsx saved with a different extension generates a zero byte file.

                     

                    Would appreciate any assistance as I am unable to figure how SQL Developer is creating these files. Looking around for java+excel export errors on www but no success yet.

                     

                    Thanks

                    • 7. Re: Unable to export file in .xlsx format from SQL developer
                      thatJeffSmith-Oracle

                      developer says it's the same code for all of the format types

                       

                      can you give me a screenshot of your export dialog, the first page where you have XLSX selected?

                      • 8. Re: Unable to export file in .xlsx format from SQL developer
                        Gary Graham-Oracle

                        If you could not export to that folder using any file extension, then the recommendation would either be to ...

                        1. Launch SQL Developer not with Open but instead with Run as administrator

                        2. Use Windows Explorer explicitly to set Properties > Security > Edit so that the folder is writable for your non-admin user (or Everyone, perhaps).

                         

                        Since that does not seem to be the case, is it possible that this is a machine with a Windows Server OS version? 

                         

                        If so, then it is possible someone has used File Resource Manager to put in place some policy that prevents xls or xlsx files from being written there.

                        • 9. Re: Unable to export file in .xlsx format from SQL developer
                          1012489

                          Hi Jeff,

                           

                          Here's a screenshot:

                           

                          oracle_error_Capture1.JPG

                           

                          The error appears as soon as I click on 'Next'.

                          If I choose csv instead - it takes me to the next screen.

                           

                          oracle_error_Capture2.JPG

                           

                          From the looks of it - I would think the issue comes in when SQL Developer invokes the library/API to generate the Excel.

                           

                          Thank you.

                          • 10. Re: Unable to export file in .xlsx format from SQL developer
                            1012489

                            Hi Gary,

                             

                            I already did try that. In the folder - I added full access for everybody.

                            Also tried the SQL developer with 'run as administrator'.

                             

                            I am using a desktop version of Windows  [Windows 7 Enterprise SP1 (32-bit) ]. From what it looks it - it isnt to do with the Security - but rather some other error at the Java level showing up as this.

                             

                            Thanks

                            • 11. Re: Unable to export file in .xlsx format from SQL developer
                              Gary Graham-Oracle

                              From what it looks it - it isnt to do with the Security - but rather some other error at the Java level showing up as this

                              All that is happening at the Java level at this point is attempting to create a file with the name you specified, then attempting to write one character to that file. There is nothing specific to Excel at this point, or even any variation in processing due to the file extension.  This is merely the OS telling Java the given file cannot be created / written.  So, from the SQL Developer team perspective, it seems more like a security issue.

                               

                              Some suggestions...

                              1. Try saving any text file from your favorite editor to that directory using "Save As" but specifying .xls or .xlsx as the file extension.

                              2. Try copying any text file to that directory, then renaming it to have .xls or .xlsx as the file extension.

                              3. Try renaming any text file to have .xls or .xlsx as the file extension, then copy it to that directory

                              4. If you have not already been doing so, create a new Windows user in case your Windows user profile is corrupt, then export to that directory.

                               

                              There is something different in your environment that must be the cause -- the chance of it being some Java / SQL Developer issue seems remote.

                              Anyway, if you really wish to follow up with this as a SQL Developer bug, it is best to log an SR with Oracle Support.

                              • 12. Re: Unable to export file in .xlsx format from SQL developer
                                1012489

                                Hi Gary,

                                 

                                I tried what you mentioned : and yes, I can replicate the issue. So what you have indicated is precisely the issue.

                                I was not able to save a file with the 'xlsx' extension from another text editor as well.

                                 

                                Another colleague of mine also faces the same issue - presumably some kind of policy pushed at the enterprise level causing this conflict.

                                 

                                Thank you very much. This resolves the issue being discussed in this thread.