Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Import Script Multiple Non-matching Excel Worksheets

Featured Replies

I am trying to script an import of three worksheets in the same Excel file. The 3 geographical regions worksheets are not structured the same, i.e. field name rows are not in the same place and are named differently.

The script runs but stops to ask which worksheet to process.

How do I create a variable/parameter in the script for it to proceed sequentially from worksheet 1-3 without stopping?

Thanks

DA

28 minutes ago, BostonFM said:

How do I create a variable/parameter in the script for it to proceed sequentially from worksheet 1-3

AfAIK, you cannot use a variable or a parameter to select the worksheet or the named range to import. It must be hard-coded into the Import Records[] script step. If the source file has 3 worksheets, your script needs to include 3 separate Import Records[] steps, each addressing a specific worksheet.

Note that you must use an actual file to set this up. Once you have selected the worksheet and saved the selection within the sep, you can add a variable to the File Path List to select the file.

 

  • Author

What would the edited File Path List look like, i.e. syntax?

Thanks!

Here's what it looks like as is. Steps 2, 3, and 4 are supposed to address each worksheet.

<redacted>

6 minutes ago, BostonFM said:

What would the edited File Path List look like

It would look something like this:

image.png.18a51fa0019ff05801ed18024dcefb3c.png

where AnActualFile.xslx is the file you used to set up the step and select the worksheet. The file itself can be deleted afterwards, but the reference needs to stay.

Of course, if the path is a constant as in your example, then the variable is not needed.

 

 

  • Author

But how is the script directed to subsequent worksheets after processing the initial. There doesn't seem to be any differentiator in your response.

The script is stopping for each worksheet to ask which one.

When you set up the script step, you should see this dialog after selecting an actual file that has multiple worksheets:

image.png.f9ce8eacfebd8675131efd0598303827.png

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.