Import data from excel to notes using java/script (JAVA/CORBA)

Hi,

I need to import data from an excel file into notes through web.

Can anybody please send me the code how to achieve that.

Thanks in Advance

Sunny Carrandi (:

Subject: This is exactly whay I would need

.- To create a java agent2.- That allows me to open a dialog box

3.- Let me select an excel file that I already have located in my C:// Directory

4.- Opens that excel file

5.- Read each row

6.- Search each row in a Notes View

7.- if the document exists in that view, update all values from the excel file row

8.- If the documents doesn’t exist, read the next row on the excel file.

Thanks,

Sunny

Subject: Java agent

A Domino Java agent (server-based agent) can’t open dialog boxes or perform other UI functions, or access data on a local drive (i.e. a user’s C: drive).

What you describe would best be done using a local Lotusscript agent, running in the Notes client.

Subject: Do you mean?

You say:java/script (JAVA/CORBA)

Do you mean JavaScript, Java or Lotusscript or do you mean you want a solution that is any of those languages?

http://www-10.lotus.com/ldd/nd8forum.nsf/02999c1268ede32685256bf0006b6f74/5259c528cba434bf85257623008378da?OpenDocument

Subject: JFileChooser

What I mean is, to create a java agent inw hich I can select an excel file and readi and base on the data in that excel file update some documents ina notes database.

Subject: is it possible to

Translate that code to java script within a java agent in Notes domino?

http://www-10.lotus.com/ldd/nd8forum.nsf/02999c1268ede32685256bf0006b6f74/5259c528cba434bf85257623008378da?OpenDocument

Subject: I’m not sure you understand what Javascript is?

But anyway, why not just do it in LotusScript, why do you need Java?

Subject: Because

I need to do it in a java agent to make possible from the web. I already the agent working in lotus script, but I was trying to see if there is a way to do it in java script in a java agent, and also see if it runs on the web.

Subject: Two things…

  1. You are aware that you can run Lotusscript code/agents on the web as well, as a server-based agent? I do it all the time.

  2. Javascript has nothing to do with Java, you seem to be slightly confused there.

Subject: My answers to Karl

  1. You are aware that you can run Lotusscript code/agents on the web as well, as a server-based agent? I do it all the time.How do you run a Lotusscript agent through web?

  2. Javascript has nothing to do with Java, you seem to be slightly confused there.

Yes, I’m sorry I meant Java not javascript.

Subject: Ha ha ha

That made me laugh, how can you say you do it all the time then ask how to do it?

Call the agent using url ?openagent (search domino designer help for information on ?Openagent)

EDIT: Sorry, I thought you had said you do it all the time, then asked how to do it. In fact Karl had said he does it all the time.

Whatever you do DO NOT use java Ui in a web browser, not unless you want flashbacks to 1996 and really bad flashbacks.

You need to do the following:

Provide a form where a user uploads their Excel File, you cannot access the file on a users local machine through a browser, so they need to upload it.

In your webquerysave agent you then need to detach that excel file to a temp location

Perform you agent import on the Excel files, do processing etc.

Delete the temp excel file.

Subject: Answer to your ha ha ha (:

I didn’t say I do it all the time, that is why I’m asking how to do it. I already have a Lotus Script agent that works in Notes Client, but I want to offer the ability of runing this same agent on a browser.

About your solution:

You need to do the following:

1.- Provide a form where a user uploads their Excel File, you cannot access the file on a users local machine through a browser, so they need to upload it.

2.- In your webquerysave agent you then need to detach that excel file to a temp location

3.- Perform you agent import on the Excel files, do processing etc.

4.- Delete the temp excel file.

My answer: I’ll work on it today and I’ll let you know how it went. I hope you stay tunned. (:

Subject: Yes

I had edited my response to indicate you didn’t say that. The edit may not have replicated before your response.

Subject: Yes 2

I noticed that after I replied hehe.

Subject: and is your excel file on the client machine or the server?

Again, the Lotusscript code exists, I provided a link, why recreate the wheel in Java?

Subject: Because …

I already have a Lotus Script agent that works in Notes Client, but I want to offer the ability of runing this same agent on a browser.