Skip to main content
New Participant
October 30, 2024
Question

Linked excel table flip columns order after updating

  • October 30, 2024
  • 3 replies
  • 617 views

I'm linking an excel sheet to a report that I'm working on on InDesign and everytime I update it the order of the columns change, like reading them in arabic. 
The text is readable, only issue is the shifting of the columns. 

 

This topic has been closed for replies.

3 replies

Adobe Expert
October 30, 2024

Hi @Maria265558995dcg ,

to resolve the issue, the reading order of columns in the placed table, do the following:

[ 1 ] Select all cells in the table ( select one cell and then do the keyboard shortcut for Select All )

[ 2 ] Run a script on the selected table. The code below is written in ExtendScript (JavaScript) and should be copied to a text-only-file you will save and later rename the suffix to ".jsx" so that InDesign can execute the code in the User panel of the Scripts panel.

// A table selected
// Change the table direction to LTR:
app.selection[0].tableDirection =
TableDirectionOptions.LEFT_TO_RIGHT_DIRECTION;
alert( app.selection[0].tableDirection );

 

In case the table direction is alread left to right and nothing changes after running the script, go with this code:

// A table selected
// Change the table direction to RTL:
app.selection[0].tableDirection =
TableDirectionOptions.RIGHT_TO_LEFT_DIRECTION;
alert( app.selection[0].tableDirection );

How to install ExtendScript (JavaScript) files and execute them, see:

https://indiscripts.com/pages/help#hd0sb2

https://www.danrodney.com/scripts/directions-installingscripts.html

 

Hm. All that said, I would suggest to open the text frame holding the table in the Story Editor Window to see if the columns are reversed in a table with direction left-to-right or if your table has the wrong table direction after updating the table:

 

If your columns show the wrong order, but the Story Editor is showing the right order from top to bottom, your table has the wrong table direction. To correct this see the script code above for LTR.

 

What could be wrong with your InDesign document or your table's text frame, I have no idea.

To test this one needs the Excel file and your sample InDesign document…

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Robert at ID-Tasker
Brainiac
October 30, 2024

@Maria265558995dcg

 

Was the table created in Excel - or exported from some other application as an Excel file?

 

New Participant
October 30, 2024

It was created in excel, I created cell style to be equal to my InDesign presentation. 
I realized that if I give format in InDesign and I have to update later, I have to re-do all the formatting work. 

Robert at ID-Tasker
Brainiac
October 30, 2024

@Maria265558995dcg

 

Does it happens in a new, fresh document?

 

Resetting formatting of the table is normal. 

 

You can mitigate it a bit by using Table Styles. 

 

If Table Style isn't not enough - I would suggest my ID-Tasker tool, not free, but extremely versatile - the only drawback - it's PC only. 

 

jane-e
Adobe Expert
October 30, 2024

@Maria265558995dcg 

 

I've moved your post from Creative Cloud desktop to the InDesign forum.

 

Can you show us what the table looks like before you update and also what it looks like in Excel?

 

Jane

 

 

New Participant
October 30, 2024

Thank you Jane. 

Table in Excel looks like this:

 

And here the moment I linked it to InDesign: 

 

And after updating the link: 

 

  

 

jane-e
Adobe Expert
October 30, 2024

Thank you for the screenshots, @Maria265558995dcg , as that makes it clear. You need to use a Table style that you can reapply when you update.

 

  • The Table style includes cell shading, borders, and Cell styles
  • Cell styles include Paragraph styles
  • Paragraph styles include Character styles

 

If you don't have these styles already, then create them when you first place the Excel file

  • Character styles: may not be needed here, as they are for words and phrases
  • Paragraph styles: you'll need at least two: Table Head and Table Body (names are up to you)
  • Cell styles: you'll need at least three for the shading. Be sure to include the appropriate Paragraph style
  • Table style: White borders, Cell styles for header, footer, left & right columns. You only need to assign a style for the Header Row. Make it a Header Row if it isn't already.
    You can't include a "second row" in the Table Style, but it can be applied manually to this row.

 

To start:

  • Save
  • Create the styles
  • Save
  • Important: select the entire table and clear the local formatting for all four styles, as local formatting overrides styles
  • Apply the Table style, then manually apply the Cell style for the "A/I Design" row

 

 

Test

  • Make a change in Excel
  • Update the table in InDesign
  • Apply the Table style plus the Cell style for the second row

 

Jane