Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Excel XLSX import preferences broken in CC 2017

Return to Forums

  • Author
    Posts
    • #90552
      Simon Kemp
      Member

      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

Viewing 0 reply threads
  • You must be logged in to reply to this topic.
Forum Ads