Hello Everyone,
can we Copy data from Excel (multiple columns) and paste them into a table/ editable table so that the table contents get appropriately filled with the values from the excel...?
can someone help me here.
Regards,
bilal.
I dont know if I understand correctly, check if its your problem:
Do you have a excel (binary) and want to upload this in some screen then:
1- The screen will "read" this binary and save it in a database,
2 - Show the data saved in a Table on front end,
3 - This Table should be editable,
4 - You need to save the "new data" and update in the database.
Hi ,
Thanks for response but im not trying to uplaod any excel im just copying multiple columns and rows data from excel and paste it in editable table so that appropriate coumn should fill with correct data..is it possible in outsytems...?
At a time i want to paste multiple records.
Regards.
Hi Leo thomas,
Please check this post ,
Hope it help you .....
https://www.outsystems.com/forums/discussion/76536/upload-excel-file-with-widget-upload-and-insert-into-database/
Kind Regards,
Kundan Chauhan
Hi Leo
You can try bootstrapping your excel data into an OutSystems entity. This will copy all of your excel data(rows and columns) into an entity in the database. Then you can create a screen to display or edit the data in the entity itself if you like.
This will help : https://success.outsystems.com/documentation/11/developing_an_application/use_data/bootstrap_an_entity_using_an_excel_file/
Thanks
Hi @Leo thomas, I am adding an OML; please see if it helps.What I have done here is add some text for you to copy because the code works for the specific format. After you have copied the text, click on the paste button, and the data will get populated in the table.If you will look at the image below, then you can see the format of the data copied from Excel. Here, each row in Excel is a new line in normal text, and each column in each row is separated by a tab.So what I did was read data from the clipboard using JS, then split the returned text on a new line, apply a loop to the returned list (there are multiple empty rows returned, I don't know why, so I placed a check to skip empty rows), and then for each row again I applied a split on a tab (used chr(9), which is a tab), used list append on the list bound to the table, and assigned value by indexing.But you will have to do other things yourself, like if you want to paste data when someone uses the ctrl+v shortcut, then you need to add an event listener; you also need to handle the case when someone pastes invalid format data.If you want to test it by copying data from Excel, please use the same format as you can see in the image below. You can type the data however you want; it just needs to be in 2 columns right next to each other.ThanksGitansh Anand