4 Replies Latest reply on Jun 17, 2013 9:50 PM by Wander5

    Microsoft excel import settings.

    Wander5

      Hi Forum,

       

      I need a help to select "Show Import Options" while placing excel files using Script.

       

      and then setting:

       

      tableFormatting = TableFormattingOptions.excelFormattedTable;

       

       

      I can't find the reference for the above anywhere,

       

      Icant find the settings changed in Place option settings, when I use the below code.

       

       

      with(app.excelImportPreferences){

      tableFormatting = TableFormattingOptions.excelFormattedTable;

      }

       

      Please help to do this.

       

      thanks

      Dhinak.

        • 1. Re: Microsoft excel import settings.
          booyajamo

          Hi Dhinak,

           

          The documentation for properties/methods can be found here

           

          http://jongware.mit.edu/idcs6js/

           

          You can search for other versions of CS documentation if you are not using CS6.

           

          Here is an example of how you can set the properties that you see when you check "show import options" from the user interface:

           

          var doc = app.activeDocument;
          
          var excelPrefs = app.excelImportPreferences;
          excelPrefs.tableFormatting = TableFormattingOptions.EXCEL_FORMATTED_TABLE;
          
          var frame = doc.rectangles.add ({geometricBounds: [1,1,10,7.5]});
          
          frame.place (File ("~/Desktop/test.xlsx"), false);
          

           

          Lindsay

          • 2. Re: Microsoft excel import settings.
            Wander5 Level 1

            Hi Lindsay,

             

            Thanks for the response.

             

            I search the link, and it seems there is not option so select "Show Import Options".

             

            However, you script really help me in other ways.

             

            thanks & rgs,

            Dhinak.

            • 3. Re: Microsoft excel import settings.
              booyajamo Level 1

              Hi Dhinak,

               

              Glad the code helped you.

               

              If you want to set the import options without the user's input just set the properties using the excelImportPreferences.

               

              If you want the dialog to open so the user can select the import options change the false to true in the frame.place() line of code.

               

              Hope this helps,

              Lindsay

              • 4. Re: Microsoft excel import settings.
                Wander5 Level 1

                Hello Lindsay,

                 

                I should really thanks again for taken effort to advise, which i really admired me..

                 

                Thanks for your support Lindsay!!!. And again very helpful reply, that change false to true, will give me immense pleasure of interacting the panel through script...

                 

                Much much thanks!!!!.

                 

                Dhinak.