Cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Excel File

Siemens Creator Siemens Creator
Siemens Creator

    Hello all,

 

                I am trying to import the attached Excel file into a Plant Simulation TableFile object via Import command.

 

                This still processing for long time but did not import, do you know How to do it?

 

 

Thanks,

 

Renato Lima

3 REPLIES

Re: Importing Excel File

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Renato,

 

the problem is that the Excel COM interface is terribly slow and your file is very big (35MB).

 

You can try to load the data using ODBC:

odbc.DriverConnect("DSN=Excel Files;FIRSTROWHASNAMES=1;DBQ=C:\test.xlsx;");
odbc.sql(TableFile, "select * from [sheet1$]");
odbc.logout;

This should be faster.

 

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Importing Excel File

Siemens Creator Siemens Creator
Siemens Creator

  Hello Ralf,

 

      I have tried to implement your suggestion but I faced some systems issue, during this time my colleague told me try to import as .txt and wow, .txt imported very fast.

 

      Thank you for your help again!!!

 

Renato Lima

Re: Importing Excel File

Siemens Phenom Siemens Phenom
Siemens Phenom

I think the trick here is to select an appropriate format in Excel. The best choice would be text with tab delimiters - I believe, you've used it.

Regards, Vladimir.