Reading the data from excel file which is in application server.
Hi,
Iam trying to read the data from excel file which is in application server.
I tried using the function module ALSM_EXCEL_TO_INTERNAL_TABLE. But it didn't work.
I tried just reading using open data set and read data set it is giving junk characters.
Please suggest me if you have any solution.
Best Regards,
Brahma Reddy
Hi Narendra,
Please see the below code I have written
OPEN DATASET pa_sfile for INPUT in text mode ENCODING DEFAULT MESSAGE wf_mess.
CHECK sy-subrc = 0.
DO.
READ DATASET pa_sfile INTO wf_string.
IF sy-subrc <> 0.
EXIT.
else.
split wf_string at wl_# into wf_field1 wf_field2 wa_upload-field3
wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7 wa_upload-field8
wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13
wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18
wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28
wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33
wa_upload-field34 wa_upload-field35 wa_upload-field36 .
wa_upload-field1 = wf_field1.
wa_upload-field2 = wf_field2.
append wa_upload to int_upload.
clear wa_upload.
ENDIF.
ENDDO.
CLOSE DATASET pa_sfile.
Please note Iam using ECC5.0 and it is not allowing me to declare wl_# as x as in your code.
Also if Iam using text mode I should use extension encoding etc.( Where as not in your case).
Please suggest me any other way.
Thanks for your help,
Brahma Reddy
Similar Messages
-
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 read the data from excel file and store into the table?
Hi All,
I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
All the excel fields and my table columns are same.
Can you share with me how can acheive this using LOB's?
ThanksHi OraSuirya,
you can try with external tables .
syntax as follows
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
location ('file.csv')
reject limit unlimited;
For this you need to create directory
Directory Creation syntax:
create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
grant read, write on directory ext_dir to <User>;
please paste the excel file in the particular directory .
I hope this will help you.
Please correct me if I am wrong anywhere .
Thanks,
Tippu. -
How to read the data from a file in another computer with user name and password login
How to read read the data from a file in anohter computer which need to login with user name and password?
duplicate post: http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2061478
duplicate post: http://forums.ni.com/t5/LabVIEW/do-need-to-enter-the-user-name-and-password-when-TCP-ip/m-p/2061612
duplicate post http://forums.ni.com/t5/LabVIEW/log-on-the-other-computer-with-user-name-and-password/m-p/2060682 -
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 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 -
Reading the data from 2 files and writing it into the 3rd file?
Hi,
I am reading datas from 2 files Say,
Example1.txt Example2.txt
Ashok ^data1^data2^data3
Babu ^data1^data2^data3
Chenthil ^data1^data2^data3
Danny ^data1^data2^data3
I want those data's to be written in a 3rd file. Say,
Example3.txt
Ashok^ data1^data2^data3
Babu^ data1^data2^data3
Chenthil^ data1^data2^data3
Danny^ data1^data2^data3
So that i can tokenize it with a delimeter(^) and get the values. Here how to append the datas in this form in Example3.txt. Eventhough u use FileWriter with append "true" as a parameter how they will apend like the Example3.txt file? Please do provide an answer for this..Since this is very urgent to be delivered...Expecting postive response.
Thanx,
JavaCrazyLoverimport java.io.*;
import java.util.*;
public class en
public static void main(String args[]) throws IOException
{int data,data1,offset,offset1;
FileOutputStream fos1=new FileOutputStream("c:/example3.txt");
FileInputStream fis=new FileInputStream("c:/example1.txt");
FileInputStream fis1=new FileInputStream("c:/example2.txt");
while((data=fis.read())!=-1)
fos1.write(data);
while((data=fis1.read())!=-1)
fos1.write(data);
fis.close();
fis1.close();
fos1.close();
}first create those 3 files in c: -
How to process other task when reading the data from a file?
Hello,
I met a problem. I created a GUI to control the audio data processing. When the "Start" button is pressed, a block of data is read from the audio file and processed, then loop.But other buttons or method cannot be operated in that procession until all data is processed.
How to let the other methods work under that circumstance? Should I use multiple threads?
The relative code:
SourceDataLine line;
boolean stop = false;
// When press "Start" button, the following method is invoked:
public void play(){
line.start();
int bytesRead = 0;
byte[] dataBuf = new byte[7500];
while (bytesRead != -1& !stop)
try
bytesRead = audioInputStream.read(dataBuf, 0, dataBuf.length);
catch (IOException e)
e.printStackTrace();
if (bytesRead >= 0)
int bytesWritten = line.write(dataBuf, 0, bytesRead);
line.drain();
// When press "stop" button, this method is invoked.
public void stop(){
stop = true;
line.stop();
// When press "***" button, the following button is invoked:
public void ***(){
Many thanks.Looking forward to getting your answer.You have to use a seperate thread :
Wheb you press the start button, you have to make sure a seperate thread is started :
Thread runner = new Thread(){
public void run(){
//Here comes your code which reads the file
runner.start();
KR,
Jan -
How to read the data from XML file and insert into oracle DB
Hi All,
I have below require ment.
I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
Many Thanks.Sounds a lot like this question, only with less details.
how to read data from XML variable and insert into table variable
We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us. Plenty of examples abound on the forums that cover the topics you seek as well. -
i face some difficulties here. the datas are encrypted...... how to get correct data ..........
Excel files are in a propriertary microsoft format. A LabVIEW "spreadsheet" file is a file containing an ASCII table with tabs separating columns and linefeeds separating rows. They are not ther same!
If you use "write to spreadsheet file" and name the file *.xls, this does NOT make it an excel file, it just tells the operating system to open it with excel if you double-click it. Excel is smart enough to notice that it is not really an excel file and does its best to convert it transparently. The same does not work in reverse.
You have several options:
You can use excel to export your data to something LabVIEW can read. Try e.g. tab delimited text.
You can use e.g. activeX to read an excel file, see: http://zone.ni.com/devzone/cda/epd/p/id/3409
Search for excel in your example finder for more possibilites.
LabVIEW Champion . Do more with less code and in less time . -
How can i read the data from attached file?
using javamail i receiving a mail with attachment
but unable to read the content of the file
Plz help me out
thanks in advanceThe answer is in the JavaMail FAQ.
-
Get the data from excel and insert into the database
I want to read the data from excel file, get the data from excel and insert into the database.
You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
This has nothing to do with JSP/JSTL. -
Hello.
Is anybody can help how to import data from excel file to the form created with designer 7.0. Originally there is a script inside the form to populate drop down list and depending from data selected in the ID number drop down list, there will be filled out the description and the prices text fields. But now I have to modify this form with data from excel file, which has more than 30000 lines and put all this data to script is too much.
So, can somebody know how can I after filling the ID number field , populate the description and price text fields with data from excel file corresponding to this ID number ?
This form is used in Adobe reader.
Any comments are welcome.
Regards,
AivarHi
That's what i said in my prev. Post to clear cache... :)
disable your cache from nqsconfig.ini
In cache section of NQSConfig file,
you find
ENABLE = YES;
set to NO
OR
if you are using data ware house as the source for OBIEE,
you know that when ETL is done, so just create iBot to purge cache automatically at that particular intervals,
So that report runs freshly at that time
And what happened to your View Selector question?
Edited by: Kishore Guggilla on Jul 3, 2009 3:52 PM -
UPLOADING DATA FROM EXCEL FILE.
Hi All,
i have to upload the data from excel file to an internal table.I am using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' for that. But the problem is it taking upto 50 characters only from each cell of excel sheet. in each cell i have more than 100 characters.
How to read these type of data?..
Plz help me in this regard.
thank you in advance!!!!
Regards,
RaviHi,
Check my previous post for the same question for referance
Re: Excel to itab
Guess this will help you.
Regards,
Ram.
Maybe you are looking for
-
How can I use cutom build icons in labview as a switch ?
I have two questions: I am trying to make a user interface, using custom-build icons. -How can I load/copy my icons into labview? What would be the best sollution for the usibility of the icons: -should I try to use the icon as a new overlay for labv
-
How do you export a working closed caption for Premiere Pro CC 2014 in .mpg format?
We do weekly 1/2 hour programs that require closed captioning for air. I need to know how to export a self contained .mpg format without using MacCaption. If not possible, is there another, less expensive, 3rd party program that I can use? Or better
-
I can only print the current page of downloaded pdf's. Not able to print "all". I'm using a Macbook air.
-
Funny latency with M-Audio Mobile Pre USB
Hi, I'm using an M-Audio MobilePre USB interface with Garageband, and I'm 99% certain that GB is doing something funny with latency. I'll record a clip, finish recording, and it'll do some funny compensation where it assumes that there is latency the
-
Imp Changes are needed in Nokia Belle
I am using Nokia E7 since last 10 months. Symbian Anna and Belle are released in between. I have seen lot of differences between Anna and Belle. The following differences are also compared with normal phones also. Here I have mainly focused on issues