Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OLE EXCEL search for cells and read values from cells

waldenhoferj
Explorer
0 Kudos


Hallo,

we do have many Excel sheets (Templates) that contain placeholder values (e.g. {PersName}).

Our goal is to read all the placeholders and replace them with the respective values that are stored in SAP. Therefore, we are trying to find the adresses of all placeholder fields.

However until now we are not able to read values (Get property value of a cell) from the excel sheet.

We also tried to call the method "find" on a range object without success.

Does somebody have some sample code that read the value of a cell and/or searches for cells with a specific content?

Best regards,

Jürgen

1 ACCEPTED SOLUTION

former_member212002
Active Contributor
0 Kudos

Have you tried the methods like GET_RANGES_DATA, SET_RANGES_DATA of class

i_OI_SPREADSHEET INTERFACE ?

Thanks

Abhinab

4 REPLIES 4

former_member212002
Active Contributor
0 Kudos

Have you tried the methods like GET_RANGES_DATA, SET_RANGES_DATA of class

i_OI_SPREADSHEET INTERFACE ?

Thanks

Abhinab

0 Kudos

Thanks very much with these methods we resolved the problems.

Best regards Jürgen

raymond_giuseppi
Active Contributor
0 Kudos

we are not able to read values (Get property value of a cell)

Can you post your already written code, so we may understand your exact problem ?

You could also use scn search tool and/or analyze some standard codes like FM ALSM_EXCEL_TO_INTERNAL_TABLE or other reports using OLE2 to get a good idea on method to call. Also record some macros in Excel and analyze the generated VBA code.

Regards,

Raymond

0 Kudos


Thanks for your answer!

regards Jürgen