0

I working on project where I need to enable users to export data from website (java/jsp based) and then make changes to that data and upon save/button click the excel updates should be reflected on the website.

I managed to write a java utility that allows a user to export data in excel format. However, I have no idea on how to send the data from excel to remote server/website. I started writing vba in excel (user will manually copy the exported data into this vba excel file) which communicates to the server via xmlhttp but did not make much progress.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • 1
    Where exactly are you stuck? Creating a web application? That itself is not related to Excel or even Java or VBA... My suggestion is to break down the process into smaller steps. Plus, I would suggest using a proper database than trying to rewrite a single file on Disk. For example, what happens when two or more people request to edit a single cell at the same time? – OneCricketeer Aug 17 '18 at 02:57
  • Hi Cricket_007, the application is ready and is working fine. Only a set of users will be performing the export, update excel which will save the data in the web app. I am stuck at calling a remote java file from excel file with all the excel data. I did break it into smaller steps 1. open a connection from excel to remote server 2. authenticate the user 3. call a remote java programme with all the data 4. java file will process the data – Ravi Sharma Aug 17 '18 at 03:32
  • You wouldn't exactly "call a Java file", you would typically call a web service, which could optionally be implemented in Java... so can you provide some of your XMLHttp code and your Java servlet code as a [mcve]? And what issues are you having with it? Note: I don't know much about VBA, but some type of excel macro is the only way I know to remotely transfer data. Again, though, Excel ODBC connections make more sense from a scalability/performance point of view – OneCricketeer Aug 17 '18 at 03:37
  • I am trying to find a way to pass the excel data to a websrvice. I was able to autheticate using the below code xmlhttp.Open "GET", myurl, False xmlhttp.setRequestHeader "Content-Type", "application/text" xmlhttp.setRequestHeader "Authorization", "Basic " + Base64Encode(user + ":" + Password) xmlhttp.send result = xmlhttp.statusText xmlhttp.abort How would you send data from excel to webservice or remote java method – Ravi Sharma Aug 21 '18 at 00:40
  • You might want to just search Java REST API in general.... Then you can start with `xmlhttp.Open "POST", serviceUrl` https://stackoverflow.com/questions/158633/how-can-i-send-an-http-post-request-to-a-server-from-excel-using-vba – OneCricketeer Aug 21 '18 at 01:31

0 Answers0