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);