How to get Remote Data from a file which is in remote system
Hi everybody,
I have developed four classes.
FileInterface.java:-
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface FileInterface extends Remote {
public byte[] downloadFile(String fileName) throws
RemoteException;
FileServer.java:-
import java.io.*;
import java.rmi.*;
public class FileServer {
public static void main(String argv[]) {
if(System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
try {
FileInterface fi = new FileImpl("FileServer");
Naming.rebind("//10.161.15.219/FileServer", fi);
} catch(Exception e) {
System.out.println("FileServer: "+e.getMessage());
e.printStackTrace();
FileImpl.java:-
import java.io.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class FileImpl extends UnicastRemoteObject
implements FileInterface {
private String name;
public FileImpl(String s) throws RemoteException{
super();
name = s;
public byte[] downloadFile(String fileName){
try {
File file = new File(fileName);
byte buffer[] = new byte[(int)file.length()];
BufferedInputStream input = new
BufferedInputStream(new FileInputStream(fileName));
input.read(buffer,0,buffer.length);
input.close();
return(buffer);
} catch(Exception e){
System.out.println("FileImpl: "+e.getMessage());
e.printStackTrace();
return(null);
FileClient.java:-
import java.io.*;
import java.rmi.*;
public class FileClient{
public static void main(String argv[]) {
try {
String name = "//10.161.15.219/FileServer";
System.out.println("1");
FileInterface fi = (FileInterface) Naming.lookup(name);
System.out.println("2");
byte[] filedata = fi.downloadFile("//10.161.15.88/C/RMITEST/Test.txt");
System.out.println("3");
File file = new File("//10.161.15.219/T.txt");
System.out.println("4");
BufferedOutputStream output = new
BufferedOutputStream(new FileOutputStream(file.getName()));
output.write(filedata,0,filedata.length);
output.flush();
output.close();
} catch(Exception e) {
System.err.println("FileServer exception: "+ e.getMessage());
e.printStackTrace();
Now Iam trying to access text file which is in remote s/m.
It is developing stub and skeleton classes,when i run it is coming for local
If I want to access remotely the error is coming like this
1
2
3
FileServer exception: null4
java.lang.NullPointerException
at FileClient.main(FileClient.java:18)
Can anybody help me please.
Probably the easiest way in this case is to run the performance trace (System/Utilities/Performance trace). Start transaction MD04, put on the trace in another window, press enter to see the stock/requirements list, then stop the trace and list the results. Then you'll see which tables were accesses with which queries.
Similar Messages
-
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
How to get the data from a file and insert into a table
Good morning,
NEED TO READ THIS FILE sui_facturacion_alcantarillado_15085_2011_01_76845_00A.csv containing the following information
NUID,NUMERO_DE_CUENTA_CONTRATO,CÓDIGO_DANE_DEPARTAMENTO,CÓDIGO_DANE_MUNICIPIO,ZONA_IGAC,SECTOR_IGAC,MANZANA_O_VEREDA_IGAC,NÚMERO_DEL_PREDIO_IGAC,CONDICION_DE_PROPIEDAD_DEL_PREDIO_IGAC,DIRECCIÓN_DEL_PREDIO,NÚMERO_DE_FACTURA,FECHA_DE_EXPEDICIÓN_DE_LA_FACTURA,FECHA_DE_INICIO_DEL_PERÍODO_DE_FACTURACIÓN,DIAS_FACTURADOS,CÓDIGO_CLASE_DE_USO,UNIDADES_MULTIUSUARIO_RESIDENCIAL,UNIDADES_MULTIUSUARIO_NO_RESIDENCIAL,HOGAR_COMUNITARIO_O_SUSTITUTO,USUARIO_FACTURADO_CON_AFORO,USUARIO_CUENTA_CON_CARACTERIZACIÓN,CARGO_FIJO,CARGO_POR_VERTIMIENTO_BASICO,CARGO_POR_VERTIMIENTO_COMPLEMENTARIO,CARGO_POR_VERTIMIENTOSUNTUARIO,CMT,VERTIMIENTO_DEL_PERIOD_EN_METROS_CUBICOS,VALOR_FACTURADO_POR_VERTIDO,VALOR_DEL_SUBSIDIO,VALOR_DE_LA_CONTRIBUCIÓN,FACTOR_DE_SUBSIDIO_O_CONTRIBUCIÓN_CARGO_FIJO,FACTOR_DE_SUBSIDIO_O_CONTRIBUCIÓN_VERTIMIENTO,CARGOS_POR_CONEXIÓN,PAGO_ANTICIPADO_DEL_SERVICIO,DÍAS_DE_MORA,VALOR_DE_MORA,INTERESES_POR_MORA,OTROS_COBROS,CAUSAL_DE_REFACTURACIÓN,NUMERO_DE_LA_FACTURA_OBJETO_DE_REFACTURACIÓN,VALOR_TOTAL_FACTURADO,PAGOS_DEL_CLIENTE_DURANTE_EL_PERÍODO_FACTURADO
242602,242602,76,845,99,99,9999,9999,999,CLL 5 CRA 7 PEATONAL,24911920,12-01-2011,01-12-2010,30,01,,,0,0,0,1,0000000000.00,0000000000.00,0000000000.00,0000000000.00,0000000005,0000002200.00,0000000000,0000000000,0.000,0.000,0000000000.00,0000000000.00,0,0000000000.00,0000000000.00,0000000000.00,0,0,0000002201.00,0000000000.00
242604,242604,76,845,99,99,9999,9999,999,CRA 4 # 6 - 13,24911846,12-01-2011,01-12-2010,30,01,,,0,0,0,1,0000000000.00,0000000000.00,0000000000.00,0000000000.00,0000000013,0000002200.00,0000000000,0000000000,0.000,0.000,0000000000.00,0000000000.00,0,0000000000.00,0000000000.00,0000000000.00,0,0,0000002201.00,0000004411.00
242605,242605,76,845,99,99,9999,9999,999,CRA 2 CLLES 3 Y 4,24911509,12-01-2011,01-12-2010,30,01,,,0,0,0,1,0000000000.00,0000000000.00,0000000000.00,0000000000.00,0000000004,0000002200.00,0000000000,0000000000,0.000,0.000,0000000000.00,0000000000.00,0,0000000000.00,0000000000.00,0000000000.00,0,0,0000002201.00,0000002200.00
this is the function that I have
<<function_test>>
DECLARE
TOTAL_CAR NUMBER;
POS_1 NUMBER:= 0;
POS_2 NUMBER:= 0;
REST NUMBER:= 0;
ACUM NUMBER:= 0;
CADEN VARCHAR2(200);
nom_archivo varchar2(80);
v1 utl_file.file_type;
v2 varchar2(2048);
BEGIN
nom_archivo := 'sui_facturacion_alcantarillado_15085_2011_01_76845_00A.csv';
v1:= utl_file.fopen('PUBLIC_ACCESS',nom_archivo,'R',32767);
utl_file.get_line(v1,v2);
SELECT LENGTH(v2) INTO TOTAL_CAR FROM DUAL;
ACUM:=1;
POS_1:=0;
WHILE ACUM <= 60
LOOP
select instr(v2, ',', 1, ACUM) PRUEBA
INTO POS_2
FROM DUAL;
dbms_output.put_line(' TOTAL POSICION 1--> '|| POS_1);
dbms_output.put_line(' TOTAL POSICION 2--> '|| POS_2);
dbms_output.put_line(' TOTAL ACUMULADO --> '|| ACUM);
REST := (POS_2-POS_1)-1;
SELECT SUBSTR(v2,(POS_1+1),REST) PRUEBA2
INTO CADEN
FROM DUAL;
dbms_output.put_line(' CADENA SELECCIONADA --> '|| CADEN);
ACUM := ACUM + 1;
POS_1:= POS_2;
END LOOP;
utl_file.fclose(v1);
dbms_output.put_line(' -->');
dbms_output.put_line(' TOTAL POSICION 1-->'|| POS_1);
dbms_output.put_line(' TOTAL POSICION 2-->'|| POS_2);
dbms_output.put_line(' TOTAL ACUMULADO -->'|| ACUM);
dbms_output.put_line(' TOTAL DE CARACTERES -->'|| TOTAL_CAR);
dbms_output.put_line(' ');
EXCEPTION
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('NO SE ENCONTRARON MAS CARACTERES');
WHEN OTHERS THEN
dbms_output.put_line('OTRO TIPO DE ERROR ');
dbms_output.put_line('CODIGO ERROR '|| SQLCODE ||' '||SQLERRM);
END;
Which must be separated by a comma and enter a table I have the following procedure in which only brings me the first line, which need not
The current role I have just read and extract data from the row number 1, I do not need information.
I need information for rows 2,3,4. In each row there are 41 fields, which I enter in a table called Dato_archivos.
how to perform this function? ...
I appreciate the cooperation and explanation ...
GOOD DAY ...
REYNEL SALAZAR MARTINEZ
COLOMBIA ...When you get an error with external tables (or sql*loader) look in the same folder as the data file and you should get a .log file and maybe a .bad file too.
The log file should indicate the nature of the error it has trying to load the data.
I've just copied your sample data from your first post to a file on my server and tried it to find that you are not specifying the required format for your dates. The below shows it now working...
CREATE TABLE tabla_prueba
(NUID NUMBER,
NUM_CUENTA_CONTRATO NUMBER,
COD_DANE_DD NUMBER,
COD_DANE_MM NUMBER,
ZONA_IGAC NUMBER,
SECTOR_IGAC NUMBER,
MANZANA_VEREDA_IGAC NUMBER,
NUM_PREDIO_IGAC NUMBER,
CONDICION_PREDIO_IGAC NUMBER,
DIRECCION_PREDIO_IGAC VARCHAR2(80),
NUM_FACTURA NUMBER,
FECHA_EXPED_FACTURA DATE,
FECHA_INI_PERIODO_FACTURACION DATE,
DIAS_FACTURADOS NUMBER,
COD_CLASE_USO NUMBER,
UNI_MULTIUSUARIO_RESIDENCIAL NUMBER,
UNI_MULTIUSUARIO_NORESIDENCIAL NUMBER,
HOGAR_COMUNITARIO NUMBER,
USUARIO_FACTURADO_AFORO NUMBER,
USUARIO_CON_CARACTERIZACION NUMBER,
CARGO_FIJO NUMBER,
CARGO_VERTIMENTO_BAS NUMBER,
CARGO_VERTIMENTO_COMP NUMBER,
CARGO_VERTIMENTO_SUNT NUMBER,
CMT NUMBER,
VLR_FACTURADO_VERTIDO NUMBER,
VLR_SUBSIDIO NUMBER,
VLR_CONTRIBUCCION NUMBER,
FACTOR_SUBS_CONTR_CARGO_FIJO NUMBER,
FACTOR_SUBS_CONTR_VERTIMENTO NUMBER,
CARGO_CONEXION NUMBER,
PAGO_ANTICIPADO_SERVICIO NUMBER,
DIAS_MORA NUMBER,
VLR_MORA NUMBER,
INTERES_MORA NUMBER,
OTROS_COBROS NUMBER,
CAUSAL_REFACTURACION NUMBER,
NUM_FACTURA_OBJ_REFACTURACION NUMBER,
VLR_TOTAL_FACTURADO NUMBER,
PAGOS_CLIENTE_DURANTE_PERIODO NUMBER
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY TEST_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
SKIP 1
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
(NUID,
NUM_CUENTA_CONTRATO,
COD_DANE_DD,
COD_DANE_MM,
ZONA_IGAC,
SECTOR_IGAC,
MANZANA_VEREDA_IGAC,
NUM_PREDIO_IGAC,
CONDICION_PREDIO_IGAC,
DIRECCION_PREDIO_IGAC,
NUM_FACTURA,
FECHA_EXPED_FACTURA CHAR DATE_FORMAT DATE MASK "DD-MM-YYYY",
FECHA_INI_PERIODO_FACTURACION CHAR DATE_FORMAT DATE MASK "DD-MM-YYYY",
DIAS_FACTURADOS,
COD_CLASE_USO,
UNI_MULTIUSUARIO_RESIDENCIAL ,
UNI_MULTIUSUARIO_NORESIDENCIAL,
HOGAR_COMUNITARIO ,
USUARIO_FACTURADO_AFORO ,
USUARIO_CON_CARACTERIZACION ,
CARGO_FIJO ,
CARGO_VERTIMENTO_BAS ,
CARGO_VERTIMENTO_COMP,
CARGO_VERTIMENTO_SUNT,
CMT,
VLR_FACTURADO_VERTIDO,
VLR_SUBSIDIO ,
VLR_CONTRIBUCCION ,
FACTOR_SUBS_CONTR_CARGO_FIJO ,
FACTOR_SUBS_CONTR_VERTIMENTO ,
CARGO_CONEXION ,
PAGO_ANTICIPADO_SERVICIO ,
DIAS_MORA ,
VLR_MORA ,
INTERES_MORA ,
OTROS_COBROS ,
CAUSAL_REFACTURACION ,
NUM_FACTURA_OBJ_REFACTURACION,
VLR_TOTAL_FACTURADO,
PAGOS_CLIENTE_DURANTE_PERIODO
LOCATION ('test.csv')
SQL> select * from tabla_prueba;
NUID NUM_CUENTA_CONTRATO COD_DANE_DD COD_DANE_MM ZONA_IGAC SECTOR_IGAC MANZANA_VEREDA_IGAC NUM_PREDIO_IGAC CONDICION_PREDIO_IGAC DIRECCION_PREDIO_IGAC NUM_FACTURA FECHA_EXPE FECHA_INI_
DIAS_FACTURADOS COD_CLASE_USO UNI_MULTIUSUARIO_RESIDENCIAL UNI_MULTIUSUARIO_NORESIDENCIAL HOGAR_COMUNITARIO USUARIO_FACTURADO_AFORO USUARIO_CON_CARACTERIZACION CARGO_FIJO CARGO_VERTIMENTO_BAS CARGO_VERTIMENTO_COMP CARGO_VERTIMENTO_SUNT CMT
VLR_FACTURADO_VERTIDO VLR_SUBSIDIO VLR_CONTRIBUCCION FACTOR_SUBS_CONTR_CARGO_FIJO FACTOR_SUBS_CONTR_VERTIMENTO CARGO_CONEXION PAGO_ANTICIPADO_SERVICIO DIAS_MORA VLR_MORA INTERES_MORA OTROS_COBROS CAUSAL_REFACTURACION NUM_FACTURA_OBJ_REFACTURACION
VLR_TOTAL_FACTURADO PAGOS_CLIENTE_DURANTE_PERIODO
242602 242602 76 845 99 99 9999 9999 999 CLL 5 CRA 7 PEATONAL 24911920 12-01-2011 01-12-2010
30 1 0 0 0 1 0 0 0 0
5 2200 0 0 0 0 0 0 0 0 0 0 0
0 2201
242604 242604 76 845 99 99 9999 9999 999 CRA 4 # 6 - 13 24911846 12-01-2011 01-12-2010
30 1 0 0 0 1 0 0 0 0
13 2200 0 0 0 0 0 0 0 0 0 0 0
0 2201
242605 242605 76 845 99 99 9999 9999 999 CRA 2 CLLES 3 Y 4 24911509 12-01-2011 01-12-2010
30 1 0 0 0 1 0 0 0 0
4 2200 0 0 0 0 0 0 0 0 0 0 0
0 2201
SQL>
{code} -
How to get the data from a table which are availble in MD04
Hello,
Can you please let me know the tables in which the 'data available in MD04' are stored.
I would like to have the data pertaining to the customer order/Item with requirements available in MD04.
Thanks and Regards,
Jana.Probably the easiest way in this case is to run the performance trace (System/Utilities/Performance trace). Start transaction MD04, put on the trace in another window, press enter to see the stock/requirements list, then stop the trace and list the results. Then you'll see which tables were accesses with which queries.
-
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com -
How to get all data from nokia to i5s
how to get all data from nokia E71 to i5s???
if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.
-
How to get the data from multiple nodes to one table
Hi All,
How to get the data from multiple nodes to one table.examples nodes are like A B C D E relation also maintained
Regards,
IndraHI Indra,
From Node A, get the values of the attributes as
lo_NodeA->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = ls_attributesA ).
Similarily get all the node values from B, C, D and E.
Finally append all your ls records to the table.
Hope you are clear.
BR,
RAM. -
How to get the data from pcl2 cluster for TCRT table.
Hi frndz,
How to get the data from pcl2 cluster for tcrt table for us payroll.
Thanks in advance.
Harisumanth.ChPL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
~Suresh -
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil -
How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).
Hi,
My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
Here is my question:
How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
Please help on this, also send me any documentation about this if you have.
Thanks,
Pavan.Hello,
here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
Regards
Walter Habich
REPORT habitest2 LINE-SIZE 255.
TYPES:
strtab_t TYPE TABLE OF string.
CONSTANTS:
separator VALUE ';'.
DATA:
it_s012 LIKE s012 OCCURS 0,
wa_s012 LIKE s012,
strtab TYPE strtab_t,
strele TYPE string.
SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
PERFORM data_to_string
TABLES
strtab
USING
'S012'. "requires it_s012 and wa_s012
LOOP AT strtab INTO strele.
WRITE: / strele.
ENDLOOP.
*& Form data_to_string
FORM data_to_string TABLES strtab TYPE strtab_t
USING ittab TYPE any.
DATA:
h_zaehler TYPE i,
line_str TYPE string,
l_tabellenname(10) TYPE c,
l_arbeitsbereichsname(10) TYPE c,
h_string TYPE string,
h_char(255) TYPE c.
FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
<l_arbeits> TYPE ANY,
<feldzeiger> TYPE ANY.
CLEAR strtab.
CONCATENATE 'IT_' ittab INTO l_tabellenname.
ASSIGN (l_tabellenname) TO <l_tabelle>.
CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
LOOP AT <l_tabelle> INTO <l_arbeits>.
CLEAR: h_zaehler, line_str.
line_str = ittab.
DO.
ADD 1 TO h_zaehler.
ASSIGN COMPONENT h_zaehler OF
STRUCTURE <l_arbeits> TO <feldzeiger>.
IF sy-subrc <> 0. EXIT. ENDIF.
WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED. "#EC *
h_string = h_char.
CONCATENATE line_str separator h_string INTO line_str.
ENDDO.
APPEND line_str TO strtab.
ENDLOOP.
ENDFORM. "data_to_string -
How to Load the data from excel file(Extension is .CSV) into the temp.table
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinHello Sachin,
You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
Instead of copy values into forms you can save them in your temporary table.
Kind regards,
Alex
If someone's helpful or correct please mark it accordingly. -
How to load the data from .csv file to oracle table???
Hi,
I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
Thanks in advance981145 wrote:
Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
the command is
sqlldrType it and see if you have it installed.
Have a look also at the FAQ link posted by Marwin.
There are plenty of examples also on the web.
Regards.
Al -
How to load the data from excel file into temprory table in Forms 11g?
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinDeclare
v_full_filename varchar2(500);
v_server_path varchar2(2000);
v_separator VARCHAR2(1);
v_filename VARCHAR2(400);
filename VARCHAR2 (100);
v_stop_load varchar2 (2000);
v_rec_error_log varchar2(4000);
v_error_log varchar2(4000);
ctr NUMBER (12);
cols NUMBER (2);
btn number;
RES BOOLEAN;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
cellType ole2.OBJ_TYPE;
args ole2.obj_type;
PROCEDURE olearg
IS
args ole2.obj_type;
BEGIN
args := ole2.create_arglist;
ole2.add_arg (args, ctr);
ole2.add_arg (args, cols);
cell := ole2.get_obj_property (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
END;
BEGIN
v_full_filename := client_get_file_name(directory_name => null
,file_name => null
,file_filter => 'Excel files (*.xls)|*.xls|'
||'Excel files (*.xlsx)|*.xlsx|'
,message => 'Choose Excel file'
,dialog_type => null
,select_file => null
If v_full_filename is not null Then
v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
v_filename := v_separator||v_full_filename ;
:LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);
RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));
--Begin load data from EXCEL
BEGIN
filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', 'false');
workbooks := ole2.get_obj_property (application, 'Workbooks');
args := ole2.create_arglist;
ole2.add_arg (args, filename); -- file path and name
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'Sheet1');
worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
ole2.destroy_arglist (args);
ctr := 2; --row number
cols := 1; -- column number
go_block('xxx');
FIRST_RECORD;
LOOP
--Column 1 VALUE --------------------------------------------------------------------
olearg;
v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
:item1 := v_stop_load;
cols := cols + 1;
--Column 2 VALUE --------------------------------------------------------------------
olearg;
:item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
cols := cols + 1;
--<and so on>
ole2.invoke (application, 'Quit');
ole2.RELEASE_OBJ (cell);
ole2.RELEASE_OBJ (worksheet);
ole2.RELEASE_OBJ (worksheets);
ole2.RELEASE_OBJ (workbook);
ole2.RELEASE_OBJ (workbooks);
ole2.RELEASE_OBJ (application);
END;
--End load data from EXCELPlease mark it as answered if you helped. -
How to load the data from excel file into table in oracle using UTL_FI
How to load the data from excel file into table in oracle
and from table to excel file
using UTL_FILE package
Please give me some exampleThis is something i tried in oracle apex
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Regards,
CKLP -
How can get formatted data from hard drive
how can get formatted data from hard drive?
No chance without special tools/knowledge. There are companies that can do it, unless you use multiple format or rewrite data with special erase ustility or unless you have done low level format.
Regards
Milos
Maybe you are looking for
-
Hi All, I am getting error "A database error occured. The database error text is: Failed to execute MDX query. Reason: Inconsistent input parameter (parameter: <unknown>, value <unknown>). (WIS 10901) " while scheduling a Webi report. Could anyone h
-
How to upgrade iTunes 12 BACK to 11?
So, in every way I can think of, iTunes 12 seems to have wrecked everything good about iTunes . . . . 1) no side bar 2) poor contrast and hard to read 3) haphazard UI with like items arranged in all the wrong places 4) entering meta data is difficult
-
Crystal Reports for Eclipse vs. Crystal Reports Developer
We are developing a Java web application for internal use. Since we have some people at the company who are familiar with Crystal Reports, we'd like to have them write reports that we can display through our application. Crystal Reports Server seem
-
hi all, my problem is smthing like this.. say i have a textbox in html and based on the value of that textbox i want to invoke an sql statement. in the textbox the user types in the part number,i.e the unique identifier in the db.if the user types in
-
Need to move to next line, if word is 1 or 2 letters
Hello All, I'd like to move the words with 1 or 2 letters from end of the line to next line as per our internal requirements, could anyone suggest whether this can be achieved using GREP option or any other advise? Thanks, Praveen