Getting file name in the table imported

5 posts / 0 new
Last post
padmathiagarajan
Offline
Joined: 07/02/2016 - 06:26
Getting file name in the table imported

Hi Brian,
I have 50 excel files with 7 sheets in each file and i would like to consolidate the same into one file with 7 sheets. The file name consists of the name of the organisation. In order to differentiate the contents i would like to append the file name in each sheet that is imported so that when i consolidate i get the organisation name in the table.
Can you help me out with this please.
Regards
Padma T

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Padma, I have a script that does that: http://ideascripting.com/ideascript/add-filename

Is this what you are looking for or are you looking for something else.

Brian

padmathiagarajan
Offline
Joined: 07/02/2016 - 06:26

Hi Brian,
This is good but it works when the database is open in IDEA. So when i have many files, i need to do it one by one.
I have to consolidate 50 excel files with 7 sheets in each file. So i would like to have file name in each of the sheets imported. Some of the files would have blank data also. Can you help me with a script to handle mutiple files and sheets.
I am enclosing a sample for your reference. 

Files: 
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Padma,

Can you confirm my understanding.  You would like a script that does the following:

  • Imports multiple excel sheets along with all their work sheets.  So in your example of 50 excel files and 7 sheet per file there would be 350 IDEA files
  • For each IDEA file a column would be added called Filename that adds on the filename of that file.

Is that right?  Thanks for the example files.

Brian

padmathiagarajan
Offline
Joined: 07/02/2016 - 06:26

Yes Brian. Your undestsanding is right.