home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cricao de Sites - 650 Layouts Prontos
/
WebMasters.iso
/
Servidores
/
bb98.exe
/
SOtest.java
< prev
next >
Wrap
Text File
|
2002-11-09
|
3KB
|
96 lines
//
// The contents of this file are subject to the BadBlue End User License
// Agreement (the "EULA"); you may not use this file except in
// compliance with the EULA. You may obtain a copy of the EULA at
// http://badblue.com/down.htm .
//
// Software distributed under the EULA is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the EULA
// for the specific language governing rights and limitations under the
// EULA.
//
// The Initial Developer of this code under the EULA is Working Resources,
// Inc., Atlanta, GA UNITED STATES. All Rights Reserved.
//
// Import ShareOffice.
//
import ShareOffice.*;
// ShareOffice tester.
//
public class SOtest {
public static void main(String[] args) {
// Get Word data.
//
SOword doc = new SOword();
String sErr = doc.Initialize("24.29.25.42.7777");
if (sErr.length() > 0) {
System.out.println("Initialization failed: " + sErr);
}
String sDoc = doc.GetWordDocument(
"24.29.25.42:7777", "path9", "creatin1.doc", "percy", "percy"
);
System.out.println(sDoc);
// Get a password-protected web page.
//
HTTPGet h = new HTTPGet();
String sPage = h.Read("http://24.29.25.42:7777/get/path3/dotsconn.txt",
"percy", "percy");
System.out.println(sPage);
// Update Excel data.
//
SOexcel xls = new SOexcel();
String sUpdate = xls.UpdateExcelData(
"24.29.25.42:7777", "path7", "bug7.xls", 1,
"A1", "9-18-2002", "D", "percy", "percy"
);
System.out.println("...\r\n"+sUpdate+"\r\n...\r\n");
// Get Excel data.
//
String[][] aasSheet = xls.GetExcelData(
"24.29.25.42:7777", "path7", "bug7.xls", 1,
"A1", "D20", "percy", "percy"
);
if (aasSheet[0][0].length() > 6 && aasSheet[0][0].substring(0, 6) == "Error:") {
System.out.println("SOexcel Error: " + aasSheet[0][0] + "\r\n");
} else {
int x, y;
for (y = 0; y < 20; y++) {
for (x = 0; x < 4; x++) {
System.out.print(aasSheet[y][x]+",");
}
System.out.println("...");
}
System.out.println(".........");
}
// Get Access data.
//
SOaccess mdb = new SOaccess();
String[][] aasData = mdb.GetAccessData(
"24.29.25.42:7777", "path10", "nflbet.mdb", "nflbase", 0, 50,
"", ""
);
if (aasData[0][0].length() > 6 && aasData[0][0].substring(0, 6) == "Error:") {
System.out.println("SOexcel Error: " + aasData[0][0] + "\r\n");
} else {
int x, y;
for (y = 0; y < 50; y++) {
for (x = 0; x < 12; x++) {
System.out.print(aasData[y][x]+",");
}
System.out.println("...");
}
System.out.println(".........");
}
// Done.
//
}
}