Hi!I need help for the following matter:1 - I am importing an Excel file with multiple worksheets.2 - I need to select only one of the worksheets.3 - Create or Update in database.From the documentation of advance excel I followed this example (see attach) because it seemed it was the more correct approach, but its give the following error - "Object reference not set to an instance of an object." in WorkBook_AddSheet action.4 - OutSystems 11 Web TraditionalThanks for the help!Best regards, Diogo
Hi everyone!Thanks for your help @Sudip Pal and time! Sorry also for not responding earlier, but i was with a short time to deliver, but i want to share some important points that were raised in this discussion and also my solution for the problem.
SOLUTION:
I hope this help for someone with similar problem. The read cell is very good for retrieving the values when the excel file is complex. From my testing, importing 2000+ data it takes me 1min to import in the background.
Hi Diogo,
Please share the OML so that I can analyze your problem and will give you a perfect solution of your problem.
Thanks,
Sudip Pal
Hi Sudip!
Thanks for your response!
The oml contains business sentive information, so I can’t share it.
What I can do is try to replicate something similar, but it will take some time
Hello Diogo,
I need more clarification in the requirement.. What exactly you want to do.
Do you want to create or update the data of a specific worksheet to an entity?
Because in the above flow you are copying the worksheet to new excel file and one more question after excel to record list what functionality you are performing?
Regards,
Pavan R
Hi Pavan!The idea is for the client to upload an excel file with different worksheets, and I just want to select one worksheet and update the db with the respective information.The way I described was my interpretation of what I needed to do from the documents of advanced excel, but if there is a better way I will follow it.In resume, my difficulty is to select a worksheet from an excel with multiple worksheets.Thanks in advance!
Hey Diogo ,
I am attaching a small demo of the thing that you want to achieve.If your problem will still not resolved then please share your OML and describe your problem little bit more.
Thanks ,
Hi again Sudip!
Sorry you posted this after I answered before.
I will check and come back with an reply.
Thank you!
Best regards!
Hey Diogo,
Did you check my OML?Does it work?
Hi Sudip!Yes it works! And thanks in an advanced for your time!But unfortunately it's the same as in my app (without the delete), and I don't know why it stops on the add sheet action. Which means it must be a problem from the version of the component? Probably, I don't know.So, I need an alternative option that gives me the same result. Any ideas?Thanks!
I have an idea.You are getting problem for "Workbook_AddSheet".So don't use that action.
Let's say "Book.xlsx" is the Excel file which contains "Sheet1","Sheet2" and "Sheet3".Now open the work book and delete the first and last Excel and download the opened workbook.Now you will get the "Sheet2".
If possible then try this approach otherwise I think another approach.
I am giving you an alternative solution for the operation that you want to execute.I haven't used WorkBook_AddSheet action. Please have a look and let me know it works or not. If it does not work then we have to find another approach.
Thanks & Regards,
Hi Sudip!I tried this approach, but I am having a problem with one of the indexes. For example, I have 6 sheets. Delete sheet 1 - ok, delete sheet 2 - pass, delete sheet 3 - ok, delete sheet 4 - ok, delete sheet 5 - error.Is there a way to retrieve how many indexes the workbook has?Thank you!
Please download my last OML and use that approach.I have already trouble shoot the issue that you are facing now.
Hi Sudip!The last oil that you post it it was the same as the one before. Did you upload the wrong one by mistake?
1 - https://www.outsystems.com/forums/discussion/90519/help-with-advance-excel-import/#Post386248
2 - https://www.outsystems.com/forums/discussion/90519/help-with-advance-excel-import/#Post386263
You are right.It is by mistake.Let me send you again.Give me some time.
Sorry for my mistake.I am sending you the latest OML.