How can I keep the width of the columns (1) and (2) a header when you replace a table?

I am trying to format a series of paintings using simple Excel files and two columns that look like this:

Screen Shot 2015-09-07 at 4.04.36 PM.png

I have already created a table style, but I find myself relating to two additional steps each time I replace the existing data with a new Excel file:

Challenge #1: Manually set the width of each column to 3 inches.

Challenge #2: Manually convert the top row a header.

Each of these tasks only takes a few seconds to set up, but I'll have to make hundreds of them and the time adds up. Here's my existing workflow:

1. Select the existing table, properly formatted.

Screen Shot 2015-09-07 at 4.09.59 PM.png

2 file > Place... (Replace the item selected and The show Import Options checked)

Screen Shot 2015-09-07 at 4.10.44 PM.png

3. import in an unformatted Table using the custom Table Style 1 created for this document.

Screen Shot 2015-09-07 at 4.08.54 PM.png

Note: Once fell, the width of the previous columns is lost and there is no identified header:

Screen Shot 2015-09-07 at 4.08.06 PM.png

4. I manually adjust the width of the columns to 3 inches.

Screen Shot 2015-09-07 at 4.08.23 PM.png

5. Finally, I converted the top row a header.

Screen Shot 2015-09-07 at 4.08.34 PM.png

Result is a perfectly formatted table, exactly 6 inches wide, each column taking up half the width.

Screen Shot 2015-09-07 at 4.08.40 PM.png

Ideas to keep the width of column after replacing the Excel file and/or fit automatically in the top row, as a header would be greatly appreciated!

Something like this should do the trick. Copy the script in a text editor, save with the extension .jsx and put in your folder of InDesign scripting. If you do this a lot, it would be useful to assign a shortcut to the script key.

To use, place your cursor in a table cell, or select a cell or a line and run the script.

//BS"D
// Copyright (c) 2015 by www.Id-Extras.com
// Free to use, but please do not remove this notice.
myTable = app.selection[0].parent;
if (!myTable instanceof Table){
  myTable = myTable.parent;
}
if (!myTable instanceof Table){
  alert("Select a cell or place your cursor in a cell, and try again");
  exit();
}
myTable.columns.everyItem().width = "3 in";
myTable.rows[0].rowType = RowTypes.HEADER_ROW;

Tags: InDesign

Similar Questions

  • How can I get the 'secure site' (padlock) icon to display when you access a web page secured with Firefox 4?

    The "secure" (lock) icon no longer appears on the status bar (or anywhere else I can find) when you go to a secure web page. How can I get the 'secure site' (padlock) icon to display when you access a web page secured with Firefox 4?

    You can add a 'lock' the b-I-S with this extension.

    https://addons.Mozilla.org/en-us/Firefox/addon/padlock-icon/

  • How can I change the Fax to be my default option when you try to print?

    For some reason any now whenever I click on 'Print', I have the default fax option.   I have to then deselect the option for the

    Printer option.   How can I change this permanently please?   I don't need to use the Fax option on this computer.

    Start/devices and printers.  Change the default printer for what you want.

  • How can I get the Prime Minister to locate files automatically when you open a project?

    I worked several days on a project in first 13, import of several dozens of movies and photos.  The program had no difficulty to locate the files that I had imported whenever I closed the program and reopened.  Last night I turned off my computer. Tonight, when I opened the project the program found no files. I found, I can locate it manually, but it is extremely painful and long. The Prime Minister how to locate these files as it did before?

    Where are the files located?

    If they are on a device that is not part of the internal system of your computer (that is to say, internal hard drive), it is possible that the program has trouble re-mapping the path to these files every time that you restart your computer.

  • I need to restrict printing, but keep the Content Type and permitted Page Extraction. How can I keep the content type and page extraction authorized display?

    When I change the settings to allow content type and page extraction and save it, it shows authorized.  When I close the pdf file, re-open it, examine the security properties, it shows the type of content as allowed and extraction of page as rejected. I need both to stay permit, how that happen?

    As soon as you select do not allow any type of change made to extract file then pages is automatically banned as well. There is no way around that.

  • How can I keep the "Automatic Save Folder" tab to open when I run Firefox 18.0?

    Firefox opens with the "Automatic Save Folder" open instead of my normal home page.

    before you save prefs.js please close firefox and your proposal is good, that the value may have any number.

  • I have 2 phones on my ID Apple how can I keep the two devices to receive the same iMessages?

    I have 2 phones on my ID Apple how can I keep the two devices to receive the same iMessages?

    How to use several devices iPhone, iPad or iPod with a computer

    Using more an iDevice on the same computer

    This mainly applies to couples who add another device and don't want their electronic mail, messages, etc. being duplicated on both devices. To start reading: How to use several iPhone, iPad or iPod devices with one computer. You must create a login separate Apple and password for anyone who will use the new iDevice. See Apple - my Apple ID and frequently asked questions about the Apple ID. The easiest way is to do it on the computer using iTunes: iTunes - how to set up an Apple ID iTunes.

    On the computer, create a new user account for the person with the new iDevice. This is the user account always uses this person. He or she will no longer use the other user account. This way the person will have a separate iTunes library. Note When finished, do not 'share' apps under a single Apple ID. Each of you must buy your own applications under your own Apple ID. When you decide to divide like this you will have to buy new applications they want to use.

    First, transfer the new devices to a new account as well as all your data.  Save pictures of flow picture you want to keep for your camera (unless they are already in the camera roll) by opening your Photos app, tap Albums icon at the bottom. Now press the album My Photo Stream; Press Select; tap the photo you want to select. tap the share (box with the face up arrow) in the lower left corner icon; in the film, and then click Save.

    If you synchronize notes with iCloud, you want to keep, you must open each of your notes and email it to yourself. Later, you can copy and paste the text into the new notes created in your new account.

    Tap Settings > iCloud > remove account (removes it only from this device, not iCloud; the person who maintains the current account is not affected) provide the password to disable find my phone and choose to keep on my iDevice when prompted.  Sign in with another Apple ID to create your new account. Choose merge to download your data.

    Once you are on separate accounts, you can each go to icloud.com and remove data from the other person to your account.

    The above was created by the user randers4. Changes were made to improve the readability and the syntax.

  • How can I keep the dock and menu bar in the window

    How can I keep the dock and menu bar in the window

    First of all, go to System Preferences and select general:

    Under the dark menu and dock option, uncheck "hide and show the menu bar automatically".

    Go back and select Dock Prefs system:

    Make sure that "automatically hide / show the dock" is not checked.

  • How can I keep the updates that I rejected following lists?

    How can I keep the updates that I reject in the following lists of available updates?

    Once you * hide * them - you won't see them even * less * they are re-certificate/changed/updated.  To whom it may * look like * see them again - but you can give the update more than a quick glance - because if she was re-certificate/updated / changed somehow - you might want to install this time.

    --
    Martin Stanley
    MS - MVP
    --
    How to ask Questions the Smart way
    http://www.CatB.org/~ESR/FAQs/smart-questions.html
  • How can I keep the bar of menus in internet explore 9 open by default?

    How can I keep the bar of menus in internet explore 9 open by default?

    Right-click on an empty spot on the toolbar and check that the Menu bar.

     
     
  • How can I keep the "on-screen keyboard" to invite the user every time that I reboot? The system is Windows Vista.

    How can I keep the "on-screen keyboard" to invite the user every time that I reboot? The system is Windows Vista.

    Please explain what you mean... "incentive"?

    The keyboard screen is not supposed to be enabled when the computer is turned on.

    Here's how to turn off on-screen keyboard:

    http://www.Vistax64.com/tutorials/72733-screen-keyboard.html

  • How can I keep the connection

    Hello.

    I have the following situation.

    I'm developing an application using a Web server to authenticate users, when a user is authenticated to create a session that I use to conduct several operations.

    Problem:

    When the user using the application by time, the connection and the session are closed, if the user performs an operation has failed because the session was destroyed and must authenticate again.

    How can I keep the connection and open session

    Hi chicoxml,

    I guess it would be similar to online sites that have the same concept of a session.  As I understand it, is that you essentially need either make the longer session time-out, not all the session timeout or use a different way to authenticate your user.

  • How can I remove the cs6 first and still keep for use in CC?

    I'm running a PC with CC.  I had to CS6 first so I can use again to an older project.  How can I remove the CS6 first and keep still (and all CC downloads)?

    Thanks for the help.

    Todd

    In the original version (traditional uninstall), you are given a screen that lets you choose what to uninstall, and then you clear again (if there). If you do not have this option, and then try to uninstall in Windows via Control Panel.

    I just tested and it gives you the screen.

  • Once I have to zoom on video in post production using the effects Panel and movement controls > scale how can I keep the sharpness of the image?

    How can I keep the sharpness after I Zoom.

    Never exceed 100% scale.  The image is going to deteriorate.

  • When I print a document in pdf format to save, how can I keep the page displayed?

    When I print a document in pdf format to save, how can I keep the page displayed? It takes extra time to close each document. He has not done this before going to a new version.

    solved.

    Judy Reynolds

    Office: (979) 703-6200

Maybe you are looking for

  • Below the average, EtreCheck attached

    I might have got a little too aggressive in trying to get rid of a a few extensions, such as Little Snitch and old Adobe software plug-ins. I was in the 'Good' performance before, now I'm at "Below average". Any suggestions are greatly appreciated. 

  • HP Envy 860-160se: HP Envy 360-160se 10 Pro Windows product key

    I just bought a new HP Gamer system that runs first on Windoows 10 Pro. However, I received not any with this system recovery discs or Windows 10 Pro CDROMs. So I've exhausted my ability to search for the system to find the product key Windows 10 Pro

  • Toshiba value added package and Qosmio F45

    Hello After reading [here | http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=103556] that there is a problem with the keyboard shortcuts no longer work after the upgrade to the 'Toshiba value added package' in * Qosmio F45 * mo

  • My HDR-PJ10 does not recognize my external hard drive 1 TB

    I bought a 1 TB external hard drive to download my videos to my new Camcorder HDR-PJ10, but it does not recognize when it is connected. It is formatted in FAT32, suggestions?

  • Z560 - replacement ODD with 2nd HARD drive?

    Hello It's a Z560 and I want to replace the optical drive with a 2nd hard drive. I've already done some research, but it seems, as if only thinkpad users want a 2nd HDD ;-) Anyone know what kind of framework is necessary for a disk 2.5 "HARD? Kind re