This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to upload data from Excel sheet to relationship tab automatically in grid ?

savan - Wednesday, March 24, 2010 9:41 AM:

Dear friends

Is it possible to get data automatically from excel sheet to grid of item automatically

please suggest me is there any method available or any other way

please go through the image in red line grid

regards

savan



PeterSchroer - Wednesday, March 24, 2010 10:54 AM:

Hello Savan,

you have a couple of options....   #1 - you can make an Action which runs a JS method.   Open a dialog,  ask the user to browse to the excel file.    THen you need to open the file and extract the data.   Might be easier of course with CSV,  but probably not imposible with a JS library you can find searching the web.    Please  look at the Community Project  "Project template management tools"  there is an example of JS method opening an xml file and getting data out,  using the Vault client side control.  

Since the Grid is a safe .NET control,  it can also accept  drag-n-drop events.   Might be more interesting for your users if they can darg-n-drop an Excel file from the desktop or windows explorer.   Drop even onto the Grid can be used to start the same method for opening the file, extracting contents etc.

Once you have the contents of the file,    then your method needs to add rows to the client Dom (unsaved new items),  and then tell the grid to refresh to paint the new rows.  Examples of this source code are in the CMII Affected Items Wizard project.

Peter