SPSS Statistics

 View Only
  • 1.  When I run the .xlsx file exported from SPSS, save it, and then run it again, the format changes.

    Posted Wed February 14, 2024 12:48 AM

    When I first check the Excel file exported from SPSS as .xlsx, the table format specified in SPSS is applied well.

    But, when I open the Excel file again after edit or save it, a problem occurs where all table formatting properties specified in SPSS (e.g. cell borders, font type, background color) are broken.

    And, every time I save a file in SPSS, the name of the Excel custom style was changed and created newly, even if I export the table in the same format every time.

    (The numbers of the custom style name change in the form of *style0000000000000, etc.)

    Also, if I check the custom style applied to each cell of the Excel file, there is a difference in the format and style applied on each cell of the Excel sheet.

     

    Is there a way to maintain the initial format of SPSS in Excel?

    Or, how can I improve compatibility between SPSS and Excel?

     

    I can give you some example images.

    1) This is what the pivot table looks like in SPSS Viewer.

     

    2) When an Excel file is first run, it maintains the same style format properties as SPSS.

     

    3) After editing such as deleting unnecessary columns, save and re-run the Excel file, the format was changed. (* The shape changes differently every time.)



    ------------------------------
    Yura Kim
    ------------------------------


  • 2.  RE: When I run the .xlsx file exported from SPSS, save it, and then run it again, the format changes.

    Posted Thu February 15, 2024 12:01 PM

    Hi @Yura Kim

    Does your behavior seem like a variation on this Known Issue DT213700?

    The workaround there was to export directly to Excel.  Are you saying that each time you Export to excel, the result is different?

    NOTE: The replication scenario I have in mind is specific to SPSS Statistics.  That is, you create some output in the Output Viewer and then you export it to Excel.  No matter how many times you export that output to Excel and under any number of names, the exported file should be the same.  Is this true for you?  Once you open exported file in Excel, then it is Excel's file and SPSS Statistics no longer has any control over it. 

    Are these changes originating in SPSS Statistics? Or are they originating in Excel once you've left SPSS Statistics?



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 3.  RE: When I run the .xlsx file exported from SPSS, save it, and then run it again, the format changes.

    Posted Thu February 15, 2024 06:44 PM

    Thank you for replying.

    I export directly from SPSS to Excel.

    I think it seems to be an Excel problem.

    Or, is there any solution about SPSS export setting?



    ------------------------------
    Yura Kim
    ------------------------------



  • 4.  RE: When I run the .xlsx file exported from SPSS, save it, and then run it again, the format changes.

    Posted Fri February 16, 2024 10:49 AM
    It sounds like you're encountering some compatibility issues between SPSS and Excel when exporting data. Here are a few suggestions to help maintain the initial format of SPSS in Excel and improve compatibility:
     
    1. **Export as CSV**: Instead of exporting directly to an Excel file (.xlsx), consider exporting your data from SPSS as a CSV (Comma-Separated Values) file. CSV files are plain text files that can be opened and edited by various spreadsheet programs, including Excel. While this won't maintain the specific formatting applied in SPSS, it ensures that the data itself is preserved accurately.
     
    2. **Export Options**: When exporting from SPSS to Excel, make sure to explore the export options available. Some options might affect the compatibility and formatting of the resulting Excel file. Look for settings related to formatting or style preservation and experiment with different configurations to see if any produce better results.
     
    3. **Manual Formatting**: If the automatic export from SPSS isn't preserving the formatting as desired, you may need to manually apply the formatting in Excel after the export. This can be time-consuming, especially for large datasets, but it allows you to control the formatting precisely according to your needs.
     
    4. **Check for Updates**: Ensure that both SPSS and Excel are updated to the latest versions. Sometimes, compatibility issues are resolved in software updates, so keeping your software up-to-date may help mitigate some of these issues.
     
    5. **Use SPSS Syntax**: If you're comfortable with SPSS syntax, you might consider using it to automate the export process. SPSS syntax offers more control over the export process and allows you to specify formatting options more precisely.
     
    6. **Contact Support**: If you're unable to resolve the issue on your own, consider reaching out to technical support for SPSS or Excel. They may be able to provide specific guidance or solutions tailored to your situation.
     
    By trying out these suggestions, you should be able to improve compatibility between SPSS and Excel and maintain the initial formatting of your data as much as possible.


    ------------------------------
    john moxley
    ------------------------------



  • 5.  RE: When I run the .xlsx file exported from SPSS, save it, and then run it again, the format changes.

    IBM Champion
    Posted Fri February 16, 2024 11:51 AM
    Reading through this thread,it appears that the data remain correct after saving in Excel, but the formatting gets modified.  I see that the text in the table is Korean, and I'm wondering whether the locale settings are causing the problem.

    SPSS is probably running in Unicode mode, but, if not, turn that on.  It probably won't have any effect, but since Excel is pure Unicode, if you are not in that mode in SPSS, there is an extra conversion required.

    Also, what is your locale setting in SPSS (SHOW LOCALE), and what is your Windows locale?  That is available from the Windows Control Panel, but the exact location varies with the Windows version.  I suspect that the problem stems from some of those settings, but that's just a guess.

    --