Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Making a script for Excel files import

$
0
0

HI!

I'm new in scripting. I tryied to make a script, that import every row as table.

But have a problems right from the start...))))

 

I wrote code for Excel file import preferences and for import and place dialog (see below), but I dont understand, how I link a code with import preferences to imported file... How can I do that?

 

-----------

 

function setExcelPrefs () {

   with(app.excelImportPreferences) {

       aligmentStyle = AlignmentStyleOptions.spreadsheet;

       decimalPlaces = 4;

       preserveGraphics = false;

       rangeName = "A1:D1";

       sheetIndex = 1;

       showHiddenCells = false;

   }

}

 

var myDocument = app.documents.item(0);

 

var textFrame = myDocument.pages.item(0).textFrames.add();

myTextFrame.geometricBounds=["6p","6p","24p","50p"];

var myExcelFile = File.openDialog("Choose an Excel file");

myTextFrame.place(myExcelFile);


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>