cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Multiple Excel Sheets.

Valued Contributor
Valued Contributor

Hello Community,

 

How to import multiple Excel sheets in to a single table file?

 

No. of MS Excel sheets is dynamic. (It  may increase or dicrease)

 

I don't have interface package to use activex.

 

Please suggest any method.

 

 

Regards,

Ibrahim.

3 REPLIES

Re: Importing Multiple Excel Sheets.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Ibrahim,

it is only possible by using an auxiliary tablefile. Please see the documention of readExcelFile.

TableFile.delete
for var j := 1 to 2
	AuxiliaryTable.readExcelFile("...\Book1.xlsx", to_str("Sheet",j))
	AuxiliaryTable.copyRangeTo({1,1}..{*,*}, TableFile, 1, 3 * j)
next

Regards,

Peter

Re: Importing Multiple Excel Sheets.

Valued Contributor
Valued Contributor

Hello Peter,

 

Thanks for the suggestion.

 

I am getting an unknown identifier error with your code. 

 

Regards,

Ibrahim.

Re: Importing Multiple Excel Sheets.

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Ibrahim,

please see my test with Plant Simulation 13:

AuxiliaryTable.jpg

 

 

 

 

 

 

 

 

 

 

Regards,

Peter