• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to invoke java code from VBA (or is there a way to bypass vba)

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have standalone application that export some data to a CSV file, for simplicity let's say: Student Name & Student ID. The list is long and I wish to provide the ability to the end-users to get more information about a particular student.

For example, from the standalone application, given the student ID, you can get a PDF of the student resume (Think about a jTable where you right click the student ID and you can export/view the student's PDF).

Question: since the list is now in CSV how can I allow end-users to export a PDF of the student resume? must I use VBA or is there a way to invoke a java code to export the PDF (obviously I'd like to invoke a java code as I already have a method:


Thanks for any pointers
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you already have a method that creates a PDF, why not just call it?

(I'm not clear on what VBA has to do with anything, is this a VBA app?)
 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I call a method from within a CSV file? The user needs some kind of an 'action' to perform.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call a method from within a CSV file? I'm not really sure what that means.

What, *precisely*, are you trying to do? What's the environment?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What, *precisely*, are you trying to do? What's the environment?



If I had to take a wild guess, I would say that the Java application has an option to dump to a CSV file -- which is, of course, a datafile.

This data file is loaded into microsoft excel -- and somehow, the user want the excel spreadsheet, after loading the CSV file, to magically have some sort of scripting to talk to the original Java application that dumped the CSV file, to get more data. Is that right?

Henry

 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, looks like I overlooked the * precisely* sorry. I'm looking for "magically have some sort of scripting to talk to the original Java application"
Thanks
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adrian Burlington wrote:I'm looking for "magically have some sort of scripting to talk to the original Java application"



There is no such a thing as magic. I was being somewhat facetious.

1. The application needs to be a service. It can't just be a standalone GUI application that is to be operated by a user. It needs to be a service that can be called programmatically. Another option is to provide a command line version of the program to enable it to do particular tasks. In this case, the client will execute the command line version programmatically.

2. There is also no such a thing as scripting in CSV files. It is purely data. So, you will need to write some sort of VB script that will either call the service, or call the command line application (depending on what you did in part 1) based on the field data.


Regardless, something tells me that this is not what you want to do.

Henry
 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mmm...I think you gave me the answer - VB. I was looking for some sort of integration between VB and java (wishful thinking I guess).

But, what I can do is this: I can create a hyperlink and access my web application - that (with security permission) will allow the creation of the PDF.

thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic