Converting java output to a excel file
I am storing the datas retrived from a file in JTable. now i need these data to be exported to an excel file. how will i do that
http://forum.java.sun.com/thread.jspa?threadID=600161&messageID=9526245#9526245
Similar Messages
-
Converting java output to a pdf file and save in a file path
hi guys i am working on MSSql server using jdbc retrieving the data and and maintaining it in the out put my problem now is that i have to convert the out put of this application i.e on the console to a pdf file.
please do help me in solving my problem
please tell me the methods using printJob.
need help in creating a printjob to th adobe distiller
so please do help me to sought out my problem
with regards
thank youSay "apropos pdf" and then "man ps2pdf" on your well equipped Linux box,a nd wee wonders!
PS2PDF(1) Ghostscript Tools PS2PDF(1)
NAME
ps2pdf - Ghostscript PostScript to PDF translator
SYNOPSIS
ps2pdf [ options ] input.ps output.pdf
DESCRIPTION
ps2pdf uses gs(1) to convert the PostScript(tm) file
"input.ps" to the Adobe Portable Document Format (PDF) in
"output.pdf." -
Converting A PDF to an Excel File
I recently purchased a list that has something along the lines of 1600 pages of data. When I purchased it, I was told it would be in an Excel spreadsheet I could manipulate and work with. Instead, it came in a PDF.
Is there anyway I can convert that PDF to an Excel file? I have been looking into third party software, does anyone have any recommendations?
Thanks.You can try saving the entire file as an Excel spreadsheet (in Acrobat X it's under File - Save As - Spreadsheet), or you can select parts of the text (using the Text Selection Tool), and then right-clicking it and exporting it or copying it as a table, if that option appears.
-
Query output transfer to excel file
hi all,
how can i query output transfer to excel file ? i am not using any tool. please suggest me. is there any method that i transfer that output to excel file?You can create a csv file. See dump_csv function from Tom Kyte.
-
Converting smartform output to a text file
Hi ,
can anyone explain me in detail that whether a smartform output can be converted to an excel file via ABAP coding in driver program.
If yes pls tell me how to do it . Thanks...
Regards,
Rose.Hi,
I don't know whether its possible (or meaningful) to convert a smartform to excel. But you can find lots of thread to convert a smartform to PDF.
SEARCH SCN with "smartform to pdf".
Regards
Karthik D -
Portal : JSP : Output in an Excel File.
Hi,
I am unable to get the output on a JSP Page in Microsoft Excel
I am trying to generate an Excel Report from my Portlet. I am picking up the data for the Report from Oracle Internet Directory.
I have created a simple JSP file ( as a Portlet ) and deployed it on Oracle App Server. I then registered a new Provider for the deployed JSP Page and added the JSP as a Portlet in a new Portal Page.
I am trying the following code snippet in the JSP :
<%@ page contentType="application/vnd.ms-excel"%>
I get this weird error :
AbstractResourceRenderer.renderBody - received IOException
java.io.UnsupportedEncodingException: Media Type of a TextResponseWrapper must start with "text/"
If I am correct, Portal should support this feature. I must be able to publish reports to an Excel File.
I am new to Oracle Portal and I find this strange. The JSP page works fine in JDeveloper, but when I access it via Oracle Portal, I get the " UnsupportedEncodingException ".
I posted my question on Metalink and was told to post my question in this forum.
I am not sure if I need to post any other information or Configuration Settings - please do let me know if any other information is necessary.
Thanks,
Sandeep.Ok,
After many sleepless nights and a long struggle, we were able to arrive at a workaround - simple & something that works.
We created a Servlet ( not a Portlet ) that generates the Excel File. The Servlet is not a Portlet and as such is not restricted in the content-types that it can use. We let the user arrive at this Servlet via a simple HTML link.
Well, that's about it ! I just wanted to post this so that anyone else tearing their hair apart with the same issue can find some solutions.
Still, I strongly feel that a superb product like Oracle Portal should support the various content types.........
Regards,
Sandeep -
Converting Smartforms output content into HTML File
Hi,
I have a requirement, Smartforms output contents needs be converted as HTML File and it should be sent as email.
I am able to get the Smartforms output in html format but the output is shown as binary format.
After the fm call the job_output_info parameter is holding the smartforms output content in
job_output_info-XMLOUTPUT[] (xsf content)
job_output_info-XMLOUTPUT-STSHEET[] (css content)
job_output_info-XMLOUTPUT-TRFRESULT[] (html content)
Help me out how to handle the job_output_info details to html format.
Code
DATA v_fm_name TYPE rs38l_fnam.
DATA v_tdsfname TYPE tdsfname VALUE 'ZVR39_SF'.
DATA output_options TYPE ssfcompop.
DATA job_output_info TYPE ssfcrescl.
DATA document_output_info TYPE ssfcrespd.
DATA job_output_options TYPE ssfcresop.
DATA w_control TYPE ssfctrlop.
*-Finding the Smartform Layout Name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = v_tdsfname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
*-Defining the output to HTML Format
*-Activating XSF Output
output_options-xdfcmode = 'X'.
output_options-xdf = space.
output_options-xsfcmode = 'X'.
output_options-xsf = 'X'.
output_options-xsfoutmode = 'A'. "
output_options-xsfoutdev = 'P863'.
output_options-xsfformat = 'X'.
*-Calling the Smartform Layout
CALL FUNCTION v_fm_name
EXPORTING
output_options = output_options
user_settings = 'X'
IMPORTING
document_output_info = document_output_info
job_output_info = job_output_info
job_output_options = job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
GiriHi,
Check this link.In that,I am converting the output of smartform to PDF and then attaching it through mail.
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/smartforms/smartform in abap.pdf -
How to output to an excel file?
Hi,
I have written a program that gets data from the database and I like to find out how to output the data to an excel file. I have read about similar topic on the discussion board and the solution are for the online application. Mine is a desktop application. The user can specify what the destination file is. Can anyone help. Thanks.The simpliest way is to take your data and write it to a Comma Dilimeted File which Excel can read without any problems or user intervention. You would use an ObjectOutputStream. Hope this helps.
-
Alv output- download to excel file
Hi
I have ALV report. My requirement is
For example i have 10 records in my ALV output.
I want to download first 5 data to excel file.
so i need to select the data and click the button download in alv screen. I created the download button in ALV screen.
how to write coding for thisHi Kumar K,
U can do it by feeling another internal table from the final internal table which u displayed...
suppose u want the record 5 to 12 then
LOOP AT itab FROM 5 TO 12.
Append itab to itab2.
ENDLOOP.
So now Itab2 contains record 5 to 12...
Logic:
Create one Custom Button ... Now For Sy-ucomm of that button... provide popup window with FROM and TO parameters...
Then using Loop... Endloop... select that much records form internal table to another internal table say itab2...
Now using GUI_DOWNLOAD or WS_DOWNLOAD or any other FMs and pass the internal table to this FM...
For more information on LOOP Syntax...
LOOP AT itab - cond
Syntax
... [FROM idx1] [TO idx2] [WHERE log_exp].
Extras:
1. ... FROM idx1
2. ... TO idx2
3. ... WHERE log_exp
Effect
The table rows to be read in a LOOP-loop can be limited by optional conditions; if no conditions are specified , all rows of the table are read.
Addition 1
... FROM idx1
Effect
The specification FROM is only possible with standard tables and sorted tables. This specification only accepts table rows starting from table index idx1. For idx1, a data object of the type i is expected. If the value of idx1 is smaller or equal to 0, then it will be set to 1. If the value is larger than the number of table rows, the loop is not passed through.
Addition 2
... TO idx2
Effect
The specification TO is only possible with standard tables and sorted tables. The specification only accepts table rows after table index idx2. For idx2, a data object of the type i is expected. If the value of idx2 is smaller or equal to 0, then the loop will not be passed. If the value is larger than the number of table rows, then the value will be set to the number of rows. If idx2 is smaller than idx1, then the loop is not passed as well.
Addition 3
... WHERE log_exp
Effect
WHERE can be specified with all table-types. After WHERE, you can specify any logical expression log_exp in which the first operand of any singular comparison is a component of the internal table. For this reason, all logical expressions are possible except for IS ASSIGNED, IS REQUESTED and IS SUPPLIED. Dynamic specification of a component through bracketed character-type data objects is not possible. Loops at sorted tables must have compatible operands of the logical expression. All rows are read for which the logical expression is true.
Notes
The logical expression specified after WHERE is analyzed once at entry into the loop. Possible changes of the second operand during loop processing are not taken into account.
While with standard tables all rows of the internal table are checked for the logical expression of the WHERE- addition, with sorted tables and hash tables (as of Release 7.0) you can achieve optimized access by checking that at least the beginning part of the table key in sorted tables and the entire table key in hash tables is equal in the logical expression through queries linked with AND. Optimization also takes effect if the logical expression contains other queries linked with AND with arbitrary operators.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
When converting a PDF file to an excel file, the format converts but none of the wording comes across
When converting a PDF file to an excel file, the format converts but none of the wording comes across
-
Oracle Matrix Rpt output to Microsoft Excel File
I am looking for a solution that would take my current Oracle 9i matrix report output directly to an excel file. I have clients that need to see the report not in a pdf format(which I currently use) but in an excel format.
Thanks,You could either use:
a) DELIMITED output, assuming that the matrix isn't too large.
b) DELIMITEDDATA output, which will just give you a dump of the data, and you'd need to construct the cross tab directly.
c) In you're using 9i, then you could use jsp tags to output directly into an Excel html file (this could get pretty complicated for a matrix report). See an example of this at http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
Regards,
Danny -
Export the sql output to an excel file
Hi,
I would llke to know how can we export an sql query out put from oracle 9i to an excel file using a java code...
Thanks in advance..
NaveenNaveen,
You can access Microsoft Excel files via JDBC using the "JdbcOdbc" driver that comes with the JDK.
Hence a simple matter of using JDBC to both extract from Oracle and insert into Excel.
You will find many resources on the Internet explaining how to do this.
Please note that I am certain that this is not the only way to achieve this.
Good Luck,
Avi. -
hey guyz iam new to java technology
please tell me whether i ca send a EXCEL file(.xls) extention as a parameter to a method (later i have to create a backup file for that excel sheet) if any one know this method please give me suggestions !!!
posting some code would be helpful
thankyou
bye n cheers
harshalol
If all you want is to create a backup of some file you can do:public class Foo
public static void main(String[] args) {
Foo f = new Foo();
f.createBackup("something.xls");
public void createBackup(String inFile) {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream(inFile);
out = new FileOutputStream(inFile + ".bak");
int read;
while ((read = in.read()) > -1) {
out.write(read);
out.flush();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
if (out != null) {
try {
out.close();
} catch (IOException e) {
e.printStackTrace();
} -
Java API for reading Excel Files.
Hi,
Can you please suggest me any api for reading excel files.
Right now i am using jxl.jar for this purpose but i am searching for an open source java api better than this.
Whether POI gives better than this ?
Thanks,
Amit Shah.Can you please suggest me any api for reading excel
files.
Right now i am using jxl.jar for this purpose
but i am searching for an open source java api better
than this.
Whether POI gives better than this ?i don't know about jxl but poi has several features which an excel can contain and it has been vastly improved in the past few versions. -
Convert Microsoft Word, PowerPoint, and Excel files to PDF
This question was posted in response to the following article: http://help.adobe.com/en_US/acrobat/pro/using/WS40411658-73C0-4669-88E8-D410F5993FAC.html
Acrobat converts a whole Excel sheet to PDF even though one wants to convert only a defined print area (if converting the Excel file with either right-click or from within Acrobat . Converting from within Excel works.)
-> Applies for Excel 2010 only .
Workaround:
Activate in Excel the function "Allow changes by more than one user at the same time" under:
Tab Review > Share Workbook > set checkmark at "Allow changes by more than one user at the same time"
then save the document and now creating a PDF with each of the above mentioned methods works as expected.
Maybe you are looking for
-
Best practice for retraction of data from BPC 10.0 to General Ledger
Hi All, I have the requirement to retract data from BPC 10.0 to General Ledger. What is the best practice for doing this? I have read the "How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I", but this is prepared
-
How do I fix? What is a "record identifier"?
-
How to can recover my original nickname in gamecenter?
Hi... Yesterday restored my iphone, when the restored is successful I go to log in game center, but I can't get my original nickname. Now I lose my records, items, and sucessful in my games. All game applications start in first nivel.
-
Hi everybody, i cannot show my image (*.jpg or *.tif) within a LinkToUrl-UI. At design time i can see the image in my web dynpro UI, but after i deploy it to the Application Server i get no image. What could be the problem? I put the image under the
-
Possible attack on my network, fire wall is disabled and I can't turn back on!
I called iPhone customer service because my phones wi-fi is greyed out and they transferred me to a "network specialist" that said my computer's firewall has been disabled via a network attack and it would cost $1200 for him to fix remotely? I calle