How do I read an excel file in java
I want to do my companies Budget.
Currently its on a *xls spreadsheet, i will later move it to a my sql data base.
How do I read this file as input in java and write a report as output ?
thanks
judy
judy_oos wrote:
Flippen nothing.
That is what I need to know: What an I use to read the csv file as input in a java program to produce a report.
I switch to csv as you mentioned it's easier.HEEEEEEEEEEEEEEEEEEEEEEELLLPAnswer the following list where you have spent 30-40 hours a week for each peiod doing the following:
Have you been programming in java at least a year?
Have you programmed in another OO language such as C++, Smalltalk for at least a year?
Have you programmed in another procedural language such as Basic for at least two years?
Have you programmed in SQL (Oracle PSQL, MS SQL Server TSQL) for at least six months?
Have you used a database reports generator such as Crystal Reports for at least a year? (Again note that this means 30-40 hours a week.)
If the answer to all of the above is no then you are not going to accomplish any of the things that you have stated here "quckly".
If you answered yes to some of the above then that gives us a starting point. So post your answers.
Similar Messages
-
How can one read a Excel File and Upload into Table using Pl/SQL Code.
How can one read a Excel File and Upload into Table using Pl/SQL Code.
1. Excel File is on My PC.
2. And I want to write a Stored Procedure or Package to do that.
3. DataBase is on Other Server. Client-Server Environment.
4. I am Using Toad or PlSql developer tool.If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
1. Get your DBA to create directory object in oracle using the following command:
create directory TEST_DIR as ‘directory_path’;
Note: This directory is on the server.
2. Grant read,write on directory directory_object_name to username;
You can find out the directory_object_name value from dba_directories view if you are using the system user account.
3. Logon as the user as mentioned above.
Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
function getData(p_filename in varchar2,
p_filepath in varchar2
) RETURN VARCHAR2 is
input_file utl_file.file_type;
--declare a buffer to read text data
input_buffer varchar2(4000);
begin
--using the UTL_FILE in built package
input_file := utl_file.fopen(p_filepath, p_filename, 'R');
utl_file.get_line(input_file, input_buffer);
--debug
--dbms_output.put_line(input_buffer);
utl_file.fclose(input_file);
--return data
return input_buffer;
end;
Hope this helps. -
How can i read local excel file into internal table in webdynpro for abap a
Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
thank u for your replyDeep,
File manuplations...............................
1. At the presentation level:
->GUI_UPLOAD
->GUI_DOWNLOAD
->CL_GUI_FRONTEND
2. At the application server level:
->OPEN DATASET : open a file in the application server for reading or writing.
->READ DATASET : used to read from a file on the application server that has been opened for reading
-> TRANSFER DATASET : writing data to a file.
-> CLOSE DATASET : closes the file
-> DELETE DATASET : delete file
If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
call function 'GUI_UPLOAD'
exporting
filename = p_file
filetype = 'ASC'
has_field_separator = '#'
tables
data_tab = t_data
p_file : excel file path.
t_data : internal table
<b>reward points if useful.</b>
regards,
Vinod Samuel. -
How can I read the EXCEL file while Program is running in background.
Hi all Expert,
How can I read the EXCEL file while Program is running in background.
Thanksyou need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
loots of information if you can search forum.. thanks -
How can I read a Excel file?
How can I read an Excel file and compare if the cells type are numeric or not??
i hope you can can give me a hand..
thanksIf you want to use plsql try utl_file supplied package to read the excel file -> http://psoug.org/reference/utl_file.html
And you can use a function like this to understand if the column is number or not ;
CREATE OR REPLACE FUNCTION is_number (
char_in VARCHAR2)
RETURN BOOLEAN
IS
n NUMBER;
BEGIN
n := TO_NUMBER(char_in);
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END is_number;
DECLARE
x BOOLEAN;
BEGIN
IF is_number('ABC') THEN
dbms_output.put_line('TRUE');
ELSE
dbms_output.put_line('FALSE');
END IF;
END;
/ -
How do I produce an excel file using java code
How do i produce an excel file using java code.
If it is possible would ne one have ne source code as an example.
I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any information. To be exact ne source code.
Thanks
LeeThat's what I use and I'd be the first to admit that it's very messy. But it works. Go use Google and see what else you can find.
-
How can I read an excel file .xls from an forms 6i
Hi
I have forms6i and webutil don t work with this version, can I read an excel file from forms6i.
Thank uHi hosoriol,
You can refer an excel as an external table first using the steps below and then you can start reading from it.
If you want to update the excel file then create an view and create instead of triggers for it.
Steps
h3. 1.[Create an external table for the excel file |http://www.adp-gmbh.ch/ora/misc/ext_table.html|Click here to view detailed description]
h4. 1. Create a directory in Oracle where you have kept the xls file
create or replace directory ext_dir as '/home/rene/ext_dir';h4. 2. grant read, write on directory ext_dir to scott;
h4. 3. creating the external table
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;
Note_
If you want to update the excel file then create a view and then create the instead of triggers to do the update, delete or insert.[Creating views on external tables | http://www.dba-oracle.com/oracle_news/2005_9_1_updating_external_tables.htm]
h3. 2. Use the data block wizard and connect to the corresponding schema and create a database block.
Kindly click Correct or Helpful if it helps Thanks :-) -
How to save html as Excel file im java
Hi to all
How can i save html file as Excel file in Java
If any solutions plz help MeThanks for ur reply
Source URL is::http://www.sttpc.com/reseller/price.htm
Target is to save table data into Excel Sheet.
Upto saving that file as Excel file its working (using I/O).
When iam trying to read excel sheet data then iam getting OLE Exception.
plz suggest me other Alternate solutions to overcome this problem.
I tried htmlparser from sourceforge.net i got partial ouput.But i want dynamic solution.
Thanks. -
How to Write data in Excel File using java
Hi
can anybody help me to write data in excel file
using java code
Thankx In AdvanceHow much are you willing to pay for that?
If you want it for free, http://jexcelapi.sourceforge.net/ -
Read&write Excel file using java
Hi everybody,
I have an assignment about methods that read and write an excel file using java (Eclipse SDK), so if anyone know about that please post the solution as soon as possible.
Thanks
Sendbadhttp://onesearch.sun.com/search/onesearch/index.jsp?qt=read+write+excel&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forums
-
How to read a Excel file through java coding
Hi,
*I need to have a code with reads data from excel file. Could u forward the jar files needed for that also.
*presently we are using client systems so we are not able to get the following jar files. Please sent these jar files inorder to proceed me to write module processor or for writing java proxies.
aii_af_cci.jar
aii_af_mp.jar
aii_af_ms_api.jar
aii_af_ms_spi.jar
aii_af_trace.jar
aii_af_svc.jar
aii_af_cpa.jar
Thank uHi Shaker thank u ,
but plz forward the jar file needed to read that is "jxl.jar" and the other jar files defined in earlier message, to my mail id .
just for confiramtion i defined again here:
aii_af_cci.jar
aii_af_mp.jar
aii_af_ms_api.jar
aii_af_ms_spi.jar
aii_af_trace.jar
aii_af_svc.jar
aii_af_cpa.jar
jxl.jar
Thank u -
I wants to read an Excel using java code (no jsp coding. I need coding in core java)
Can someone suggest me about this?
Edited by: WorkMonster on Apr 1, 2009 9:42 PMHi WorkMonster,
You may use the POI API from Apache to read or create Excel files : http://poi.apache.org/ -
Greetings all
I am not a java pro but have to develop a software for my company init. i need to read data from an excel file. I couldnt find proper help on the internet so thought about dropping a message here in java guru forum. i'll be obliged if somone could help me. thanks alot.mrityunjoy wrote:
ejp wrote:
you don't need to write ugly text file parsing codeParsing code isn't 'ugly' unless you don't know how to write it.I agree. However, in general people write lot of conditional statements and loops to handle different scenarios while processing text files.
what if the delimiter itself is part of your data?The answer to that is already defined in the CSV format.Agreed, but the complications (I gave one example only) you need to tackle unless you copy or use some existing CSV file parsing code. Moreover, why to bother so much when you have a free and open source sophisticated API.
I can think of a few reasons. At least with POI (not sure WRT to JExcel, but my guess is that this is still a valid statement), you have to build the document in memory. It is only written once all the various components have been specified in memory and then flushed to a stream. Therefore, large workbooks are problematic.
With a CSV, I have no such issues whatsoever. I can process row-by-row with very little memory overhead. For an application, say, generating reports via Excel, this can be a nontrivial issue.
I never said the approach: excel >> CSV >> process text is not a good option.
Thanks,
Mrityunjoy- Saish -
Read an excel file using java code
Hi,
I want to create an excel file on the client machine based on the personal details entered on the web page. And I want to save the file on the client machine in the form of CSV. Then I want to read the contents of the spreadsheet using Java Code from the using servlets. Can I read the contents of the file directly from the client machine or do i need to save the file on the server and then read the contents of it. Please help me solve this.Hi,
I want to create an excel file on the client machine
based on the personal details entered on the web
page. And I want to save the file on the client
machine in the form of CSV. Then I want to read the
contents of the spreadsheet using Java Code from the
using servlets. Can I read the contents of the file
directly from the client machine or do i need to save
the file on the server and then read the contents of
it. Please help me solve this.As stated I am rather certain that is impossible.
Servers don't access the file systems of client machines. -
How i will display an Excel file in java
Hi,
I have an excel File, Now i want to show it from java, i can do it by clicking an button. So when i will click a button then it will display that excel file thatt means it will be open. Is there anybody can help me?
Please give me a sample. I need thid urgently. Please help me.
With regards
Binalook in your "jexcelapi_2_5_9" package, in order to print you have to have something that understands the file strucuture of the object you want to print--ie knows what an excel file is.
Maybe you are looking for
-
Conversion routine for time key figure
Hi, i have a filed in datasource which has length 5 ( of numeric char ).it may be coz time can be represented as "hh:mm" which has of course of length 5. this particular field is mapped to a key figure of type time ( which is only 4 numc ). because o
-
Hi guys, We are trying to create a new line item in the existing PO. This new line item will be with reference to contract. is it possible to create a new line item with tcode ME22 (not ME22n) Also can we use bdc for ME22n txn? please suggest
-
Could anyone advise me on what picture format should I use? I've imported some jpeg pics into my project but when I drag them to my timeline the picture is not the same as the original one. It is actually a very bad copy of it. Any suggestions? Thank
-
Windows 7 to 8 upgrade - two recommended actions prior to upgrading
I've just updated my T410s to Windows 8 pro from Windows 7 Ultimate. There were two issues during the first, failed, upgrade attempt. During the first attempt the upgrade failed without a clear indication of what went wrong. After a few tests and a l
-
Online Report Server did not send the report data. (Error: BAW 0059)
Can someone confirm me if we can create an e-mail publication for promt based reports? I was created publications for non-prompt based report and they were successful. But when I create a publiction for an report which has prompt I am gettign the err