‎2006 Aug 14 6:22 AM
Hello All,
My requirement is to read data from Excel document having multiple worksheets. I am successful in getting all worksheets in the excel using the method spreadsheet->select_sheet.
Now I face problems while using spreadsheet_get_ranges_data. I dont have any range to select from the worksheets. When my program executes contents internal table which is importing paramater from get_ranges_data method is not getting me data from EXCEL.
Can you please give me hint or solution to solve this issue.
Best Regards,
Krishna
nagendrakurapati@gmail.com
‎2006 Aug 14 2:32 PM
You might be able to use the SELECT_ALL method of I_OI_DOCUMENT_PROCESS. This is will select all cells on the active worksheet.
After SELECT_ALL, use GET_SELECTION method of I_OI_SPREADSHEET. This will get the positions of the selected data.
Last step is to use INSERT_RANGE_DIM to insert a new range with the parameters passed back from GET_SELECTION.
There should now be a range of the data on the spreadsheet. Some of the table contents may have empty rows or columns. You will have to check after GET_RANGES_DATA.
‎2006 Aug 16 5:16 AM
Hello Norman,
Thanks for your response. But the solution is not really working for my case.
Step1: call class method spreadsheet->select_sheet
Step2: call class method spreadsheet->get_active_sheet
Step3: call class method i_oi_document_proxy->select_all
Step4: call class method spreadsheet->get_selection
Step5: Call class method spreadsheet->insert_range_dim
passing parameters selected from step 2.
But the problem is parameters (top,left,rows,columns) values supplied in step 3 is not giving me correct rows,columns that is in my EXCEL worksheet.
I have 3 rows and 3 columns, but I get 1 row and 1 column and 26 as top.
Let me know whether I am doing anything wrong in my calls to class?!.
Best Regards,
Nagendra Krishna
nagendrakurapati@gmail.com