× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
It seems we have to run the java program on PC.  In my case, users want to
input spreadsheet from an Intel server, and at night, AS400 job will start
up and load data the Intel server to AS400 file.

Is there anyway we can achieve this objective without running STRPCCMD which 
will access local PC machine?

Thanks,
CL





Patrick.F.O'Dowd@gsk.com
Sent by: java400-l-admin@midrange.com
03/04/2002 08:52 AM
Please respond to java400-l


        To:     java400-l@midrange.com
        cc:
        Subject:        Re: Transfer Exell to AS400



for AFILE setup an odbc connection (on NT, Start->Settings->Control
Panel->DataSources(ODBC)..)
the name you give the odbc connection slots in here:
                excelConnection = DriverManager.getConnection("jdbc:odbc:"
+ odbcName, "", "");


then:
String excelQuery = "select * from [ASHEET$];"; //Excel sheet name

here is a link that may help:
http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html





"Bruce Jin" <JIN007M@hotmail.com>@midrange.com on 04/03/2002 17:20:58

Please respond to java400-l@midrange.com

Sent by:  java400-l-admin@midrange.com


To:   java400-l@midrange.com
cc:
Subject:  Re: Transfer Exell to AS400


 Hi Patrick:
I have an Excel file AFILE and sheet ASHEET. How do I code the these two
statements?

               excelConnection = DriverManager.getConnection("jdbc:odbc:"
+
odbcName, "",
               String excelQuery = "select * from [Contacts$];";
file://Excel sheet name
Thanks.

Bruce

----- Original Message -----
From: <Patrick.F.O'Dowd@gsk.com>
To: <java400-l@midrange.com>
Sent: Monday, March 04, 2002 5:47 AM
Subject: Re: Transfer Exell to AS400


>
>
> I have used jdbc to load excel spreadsheet to as400 files:
>                Connection excelConnection = null;
>                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>                excelConnection =
DriverManager.getConnection("jdbc:odbc:"
+ odbcName, "", "");
>
>
>                Statement excelSelect = null;
>                excelSelect = excelConnection.createStatement();
>                String excelQuery = "select * from [Contacts$];";
file://Excel sheet name
>                ResultSet excelData =
excelSelect.executeQuery(excelQuery);
>
>                while (excelData.next()) {
>                            String node = excelData.getString("Node");
>                            String contactName =
excelData.getString("Contact Name");
>
>                     etc..
>
> To convert the excel data to XML, you could use JDOM.
>
>

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.




--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.