• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Beans ActiveX  RSS feed

Isabel Wanderley
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I'm looking for some examples, some articles explaining how I can use and activeX component that I have in Java, how can I make a JavaBeans with this funcionality...
Thanks, Isabel
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This page lists some Java COM bridge options. I haven't yet found any that are solid enough or solidly supported enough to use in a corporate setting. Let us know what you find!
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the J-Integra as java and com bridge.
Please see the code below which call the excel from java. here J-Integra use as bridge bet java and excel

import excel.*;
import java.util.Date;
public class ExcelExample {
public static void main(java.lang.String[] args) {
try {
// Create an instance of Excel.Application.
Application app = new Application();
app.setVisible(true); // Nice to see what is happening
// Use Excel objects to get at a range in the displayed Worksheet
Workbooks workbooks = app.getWorkbooks();
Workbook workbook = workbooks.add(null);
Sheets worksheets = workbook.getWorksheets();
Worksheet sheet = new Worksheet(worksheets.add(null, null, null, null));
Range range = sheet.getRange("A1:C3", null);
// New contents for the range -- notice the standard Java types
Object[][] newValue = {
{ "defe", new Boolean(false), new Double(98765.0 / 12345.0)},
{ new Date(), new Integer(5454), new Float(22.0 / 7.0) },
{ new Boolean(true), "dffe", new Date() }
range.setValue(newValue); // Update the spreadsheet
Thread.sleep(10000); // Sleep 10 seconds
// maybe you want to change a value in the spreadsheet
// Get the new content of the range
Object[][] values = (Object[][]) range.getValue();
// Print them out. Again, the values are standard Java types
for (int i = 0; i < values.length; i++) {
for (int j = 0; j < values[i].length; j++) {
System.out.print(values[i][j] + "\t");
// False means don't prompt to save changes
workbook.close(new Boolean(false), null, null);
} catch (Exception e) {
} finally {
// Release all remote objects that haven't already been garbage collected.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!