Copy link to clipboard
Copied
I have a very large excel file with hundreds of photos placed into the cells. I'm trying to import it into InDesign. I noticed that all of the images were anchored and were imported in weird positions in the cells. I've tried many different scripts to release or unanchor the images, but none of them work. I think it has something to do with them being in an excel document prior to placing into my InDesign document. The scripts I've tried ran just fine (no errors) but they didn't actually change anything. Does anyone else have this problem?
Moved from Using the Community (which is about the forums) to the correct forum... Mod
To ask in the forum for your program please start at https://community.adobe.com/
Copy link to clipboard
Copied
Why do you have images placed in Excel?
Just curious here.
What scripts have you tried?
https://creativepro.com/releasing-inlines/
Curious to know what the workflow here is and the expected outcome.
Thanks
Copy link to clipboard
Copied
Hello,
Its how my job started making the spreadsheets years ago. It wasn't until I came onboard that I asked for us to move these spreadsheets into Indesign and just create new documents in Indesign for future projects. Excel can't handle the hundreds of images we have placed in the cells. I'm trying to save time by importing the spreadsheets so I don't have to recreate hundreds of documents from scratch in Indesign, but all of the images import as anchored.
I'm basically wanting the ability to import an excel spreadsheet with the formatting the same and the photos un-anchored so that they can be moved around the table cells in Indesign after import. There aren't any functions or formulas in my spreadsheets; just text and hundreds of images.
I've tried the following scripts:
___________________________________________________
stories = app.documents[0].stories.everyItem().getElements();
for (i = 0; i < stories.length-1; i++) {
inlines = stories.pageItems.everyItem().getElements();
for (j = inlines.length-1; j >= 0; j--) {
if (inlines.parent instanceof Character && inlines.anchoredObjectSettings.anchoredPosition !== AnchorPosition.ANCHORED) {
inlines.anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED;
inlines.anchoredObjectSettings.releaseAnchoredObject();
}
}
}
____________________________________________________
var a = app.activeDocument.allPageItems, t;while( t = a.pop() ) { t.isValid && t.hasOwnProperty('anchoredObjectSettings') && (t.parent instanceof Character) && (t=t.anchoredObjectSettings).isValid && t.releaseAnchoredObject(); }
_____________________________________________________
var myDoc =app.activeDocument;
app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences.findWhat= "^a";
myDoc.changeText();
app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
_____________________________________________________
Copy link to clipboard
Copied
"The scripts I've tried ran just fine (no errors) but they didn't actually change anything."
Hi defaultiub28263ucr0,
the first code you posted above does not access tables at all.
Just anchored objects in text outside of tables.
Work with the allGraphics array of a table.
Loop that array, duplicate every parent of every graphic and then remove the parent.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Uwe,
I'm not gonna lie, I have no idea what you just said. haha. I have no experience on creating scripts with Indesign. =(
But I will research what you said.