2 Replies Latest reply on Dec 15, 2016 4:59 AM by Skemp - ACE

    Excel Import Prefs for XLSX not working in CC 2017?

    Skemp - ACE

      Hi all, hope someone can help.

       

      I am attempting to convert a script that has been working fine in CS4 to work with CC 2017. However I have discovered that the excelImportPreference do not seem to work for Excel files saved as XLSX but do for XLS files. Is this a known bug and is there a workaround?

       

      In particular, it is the sheetIndex preference I need to set, Users can set the TableFormatting preference in the application itself but the sheetIndex varies.

       

      test script below:

       

      //myImport_Excel = File ("~/Desktop/test.xls") // Working in CS4 and CC 2017

      myImport_Excel = File ("~/Desktop/test.xlsx")  //Not Working in CC 2017

       

       

      var myTextFrame1 = app.activeDocument.pages[0].textFrames.add({geometricBounds: [20, 10, 80, 250]});

       

       

      with(app.excelImportPreferences) {  

      sheetIndex =  0;

      TableFormatting = TableFormattingOptions.EXCEL_UNFORMATTED_TABBED_TEXT;  

      }     

       

       

      myTextFrame1.place(myImport_Excel)

       

       

      Thanks.