Skip to main content

Importing Excel File

Hello everybody,
it is actually the first time that I use IDEA for programming. Brian, I have had a look at your script which allows to import multiple Excel files from one folder into IDEA. Unfortuately, I could not solve my problem.
I recorded a macro in IDEA allowing to import just a single Excel file.
Function ExcelImport Set task = Client.GetImportTask("ImportExcel") dbName = Client.LocateInputFile ("I:\Team Pp-Shf-Sob-Ava\Teammitglieder\Voith\IDEA Makro Lam\Originaldaten\Unverkäuflichkeitsanalyse.xlsx") task.FileToImport = dbName task.SheetToImport = "excel für IDEA" task.OutputFilePrefix = "Unverkäuflichkeitsanalyse" task.FirstRowIsFieldName = "TRUE" task.EmptyNumericFieldAsZero = "FALSE" task.PerformTask dbName = task.OutputFilePath("excel für IDEA") Set task = Nothing Client.OpenDatabase(dbName)End FunctionI would like to have a dialog box, which allows me to select the respective Excel file since the macro shall be used for various clients. Only the first worksheet in the Excel file shall be imported. In the example its name is "excel für IDEA".
After all, it is important, that the imported Excel sheet is named "Unverkäuflichkeitsanalyse-excel für IDEA" in IDEA, since I am going to apply other makro on it.
Could anybody help me in solving this problem. It is greatly appreciated.
Greetings from Germany,
Bobby
 

Brian Element Thu, 12/10/2015 - 10:08

Hi Bobby, that would be a simple script.  Which version of IDEA are you using as V9 has additional functions for selecting files that are not available in V8.

Bobby Thu, 12/10/2015 - 12:27

Hi Brian,
thank you very much for your quick response. I am on IDEA Version 8.0.5.243.
Best wishes
Bobby

Brian Element Fri, 12/11/2015 - 16:24

Hi Bobby, do you want to try this one out.  It might take some tweeks as I have V10 on my machine so you might a syntax error on some items but hopefully it will work for you.

Let me know.

Brian

Bobby Tue, 12/15/2015 - 07:15

Hello Brian, thank you very much for your quick response. Your script works fine on Version 8.5 as well. I will include it in the makros that I have prepared and hopefully, it will work out!
Take care.
Bobby

Lois Tue, 06/05/2018 - 10:30

Hello Brian,
I used the script Import Multiple Files for importing multiple CSVs. However, my challenge is that even though I created an RDF file by importing one of the files, subsequent imports using the script gives empty records for all the tables in IDEA.
In addition, I am dealing with hundreds of CSVs which I must merge into a single file. Is there a way I can immediately merge the multiple CSVs at the point of import?
Thanks for your time.
Lois

The website encountered an unexpected error. Try again later.