How to save a file generated with jxl on a server?
Please can anyone tell how to save a newly genarated excel file in a folder on a server?
response.setContentType("application/vnd.ms-excel");
response.setContentType("text/html; charset=utf-8");
response.setHeader("Content-Disposition","attachment; filename=report.xls");
WritableWorkbook w = Workbook.createWorkbook(response.getOutputStream());
WritableSheet s = w.createSheet("Report_detail",0);
but this sends my file to a browser
Thanx
FileOutputStream...
but this sends my file to a browserDon't tell me that surprised you? Why did you write that code in the first place?
Similar Messages
-
How to save pdf file in database
Dear All,
my application is forms 6i and database is 8i,requirement is that how to save pdf file in database and users can view through formsI'll apologize up front for the length of this post. I have a few database procedures I created that write a file to a BLOB column in a table as well as retrieve the BLOB from the column after it stored there. I have successfully stored many different types of binary file to the database using these procedures - including PDF files. I have not used these procedures in a Form so I can confirm that they will work, but theoretically they should work. I'm including the code for each procedure in this posting - hence the apology for the long post! :-)
Also, since these procedures reside on the database you will need to use Forms TEXT_IO built-in package to write your file to the server before you can use these procedures to store and retrieve the file from the database.
These procedures reads and writes a binary file to a table called "LOB_TABLE." You will need to modify the procedure to write to your table.
-- Author : Craig J. Butts (CJB)
-- Name : load_file_to_blob.sql
-- : This procedure uses an Oracle Directory called "IN_FILE_LOC". If you
-- already have a directory defined in the database or would prefer to use
-- a different Directory name, make sure you modify line 21 to reflect the
-- new Directory name.
-- ==================================================================================
-- History
-- DATE WHO DESCRIPTION
-- 12/11/07 CJB Created.
CREATE OR REPLACE PROCEDURE load_file_to_blob (p_filename IN VARCHAR2) IS
out_blob BLOB;
in_file BFILE;
blob_length INTEGER;
vErrMsg VARCHAR2(2000);
BEGIN
-- set the in_file
in_file := BFILENAME('IN_FILE_LOC',p_filename);
-- Get the size of the file
dbms_lob.fileopen(in_file, dbms_lob.file_readonly);
blob_length := dbms_lob.getlength(in_file);
dbms_lob.fileclose(in_file);
-- Insert a new Record into the tabel containing the
-- filename specified in P_FILENAME and a LOB_LOCATOR.
-- Return the LOB_LOCATOR and assign it to out_blob.
INSERT INTO lob_table (filename, blobdata)
VALUES (p_filename, EMPTY_BLOB())
RETURNING blobdata INTO out_blob;
-- Load the file into the database as a blob.
dbms_lob.open(in_file, dbms_lob.lob_readonly);
dbms_lob.open(out_blob, dbms_lob.lob_readwrite);
dbms_lob.loadfromfile(out_blob, in_file, blob_length);
-- Close handles to blob and file
dbms_lob.close(out_blob);
dbms_lob.close(in_file);
commit;
-- Confirm insert by querying the database
-- for Lob Length information and output results
blob_length := 0;
BEGIN
SELECT dbms_lob.getlength(blobdata) into blob_length
FROM lob_table
WHERE filename = p_filename;
EXCEPTION WHEN OTHERS THEN
vErrMsg := 'No data Found';
END;
vErrMsg := 'Successfully inserted BLOB '''||p_filename||''' of size '||blob_length||' bytes.';
dbms_output.put_line(vErrMsg);
END;
-- Author : Craig J. Butts (CJB)
-- Name : write_blob_to_file.sql
-- Descrip : This procedure takes a BLOB object from a database table and writes it
-- to the file system
-- ==================================================================================
-- History
-- DATE WHO DESCRIPTION
-- 12/11/07 CJB Created.
CREATE OR REPLACE PROCEDURE write_blob_to_file ( p_filename IN VARCHAR2 ) IS
v_blob BLOB;
blob_length INTEGER;
out_file UTL_FILE.FILE_TYPE;
v_buffer RAW(32767);
chunk_size BINARY_INTEGER := 32767;
blob_position INTEGER := 1;
vErrMsg VARCHAR2(2000);
BEGIN
-- Retrieve the BLOB for reading
BEGIN
SELECT blobdata
INTO v_blob
FROM lob_table
WHERE filename = p_filename;
EXCEPTION WHEN OTHERS THEN
vErrMsg := 'No data found';
END;
-- Retrieve the SIZE of the BLOB
blob_length := DBMS_LOB.GETLENGTH(v_blob);
-- Open a handle to the location where you are going to write the blob
-- Note: The 'WB' parameter means "Write in Byte Mode" and is only
-- available in the UTL_FILE pkg with Oracle 10g or later.
-- USE 'W' instead for pre Oracle 10q databases.
out_file := UTL_FILE.FOPEN('OUT_FILE_LOC',p_filename, 'wb', chunk_size);
-- Write the BLOB to the file in chunks
WHILE blob_position <= blob_length LOOP
IF ( ( blob_position + chunk_size - 1 ) > blob_length ) THEN
chunk_size := blob_length - blob_position + 1;
END IF;
dbms_lob.read(v_blob, chunk_size, blob_position, v_buffer );
UTL_FILE.put_raw ( out_file, v_buffer, TRUE);
blob_position := blob_position + chunk_size;
END LOOP;
END;Hope this helps.
Craig...
-- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks! -
How to save CSV file in application server while making infospoke
How to save CSV file in application server to be used as destination while making infospoke.
Please give the steps.........Hi
If you want to load your flatfile from Application server,then you need to trasfer your file from your desktop(Computer) to Application server by using FTP.
Try using ARCHIVFILE_CLIENT_TO_SERVER Function module.
You Just need to give thesource path and the target path
goto SE37 t-code , which is Function module screen, give the function name ARCHIVFILE_CLIENT_TO_SERVER, on click F8 Execute button.
for path variable give the file path where it resides like C:\users\xxx\desktop\test.csv
for target path give the directory path on Application server: /data/bi_data
remember the directory in Server starts with /.
U have to where to place the file.
Otherwise use 3rd party tools to connect to ur appl server like : Core FTP and Absolute FTP in google.
Otherwise...
Goto the T.code AL11. From there, you can find the directories available in the Application Server.
For example, if you wanna save the file in the directory "DIR_HOME", then you can find the path of the directories in the nearby column. With the help of this, you can specify the target path. Specify the target path with directory name followed by the filename with .CSV extension.
Hope this helps
regards
gaurav -
How to save psd files...
how to save psd files so other can change (with all fonts and Layers)
I need to know how to save everything in the psd so others still can use it.??Hi,
If you have photoshop and you are working on it and have used layers , fonts , and other things
Then after completing your work, click save and it will open save Box,
make sure the file format in the box should be PSD and then you may save the file and then you can share with any one.
Any one who has Photoshop will be able to open that file and can edit the layers and fonts..
--Baljeet -
How to save .pdf file using office word and excel
Can someone help me how to save .pdf files using office word and excel? I reinstalled my adobe 7.0 pro in my new pc and before I was able to do it but with my old pc.
For anything after Office 2003, you have to print to the Adobe PDF printer. If you installed AA 7 on OS newer than XP, you may have to do a workaround to get it to work. With later versions of WORD you can always use the MS plugin for creating PDFs.
-
Hi,
It is urgent for me to know how to save xml file. I use VC++6.0, Oracle xdk 9.0.0.0.0 or 9.0.0.0.0Abeta under windows98.
It is OK to compile the program with print() method. But system will tell me there is illegal operation when I run it. If I delete the line with print(), the result will be normal.
in class node, there is two functions
void print(ostream *out = &cout, uword level = 0,uword step = 4);
void print(DOMString buffer, size_t bufsize, uword level = 0, uword step = 4);
Is there anyone who may tell me how to use them? to write back specific xml file?
Without print(), I can not save the xml file...It seems in Oracle xdk9.0.0.0.0, there is no obvious function to save the file.(or because I am a new comer , not familier with DOM)
Can anyone tell me how to save xml file? or just paste an example! It is very a little urgent to me...Hope you give me some ideas....
Many thanks in advance!!!!
yours,
FienaHi,
goto sxmb_adm > intergration engine configration > specific configration
go in edit mode > new entry
choose
Category -> IDoc
Parameters -> XML_CONVERSION
current value -> 2
Regards,
Manisha -
Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory
Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it.
Alex D
Applications Engineer
National Instruments -
I am trying to make my fiels viewable to someone who has Adobe CC version 9.2, but I have version 10.0. Does anyone know how to save my files so the are readable?
You will likely get better program help in a program forum
The Cloud forum is not about using individual programs
The Cloud forum is about the Cloud as a delivery & install process
If you will start at the Forums Index https://forums.adobe.com/welcome
You will be able to select a forum for the specific Adobe product(s) you use
Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll -
How to save iPhoto file in a separate portable hard disk drive?
How to save iPhoto file in a separate portable hard disk drive?
You want to move the iPhoto Library?
Make sure the drive is formatted Mac OS Extended (Journaled)
1. Quit iPhoto
2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
Regards
TD -
How to save Numbers file as Excel (XLSX) file ?
I just want to know how to save Numbers files into Excel format. Because other than Mac users can't able to access Numbers format.
File, Export To, Excel…
-
How to save image files into SQL Server?
Hello, All:
Does anyone know how to save image files into SQL Server? Does the file type have to be changed first?? Please help me! Thank you!You need a BLOB field (usually)... Then you can check this tutorial out:
http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/BLOBPut/
There are other exercises on that site, including one on reading the images back. -
New Nikon D750:
Lightroom 5.6 does not recognize nef (RAW) image files generated with the new Nikon D750: who can help here or knows what to do? Thanks, PeterLR 5.6 doesn't support the new Nikon D750. You have to wait to the next update.
You con also install the release candidate of the DNG converter and convert your NEF files to dng.
http://blogs.adobe.com/lightroomjournal/2014/10/1366.html
Axel -
Can someone please tell me how to save a snapsnot taken with Adobe Reader X?
Could someone please tell me how to save a snapshot taken with Adobe Reader X ?
After taking the snapshot, you need to open a new document in an application that allows you to paste images.
-
How I save a 1D-folat array to MS Sql Server"s image field?
How I save a 1D-folat array to MS Sql Server"s image field?
I try.
First all I flat the array.
Then I insert the flated string into the table.It 's OK.
I read it from the table.
There is a error.
The field data is empty.
why?
Attachments:
01.vi 51 KBTimeWaveZero wrote:
Just use the Array to spreadsheet string and insert the array, then retrieve with Spreadsheet string to array.
This is a lossy conversion that does not allow recovery of the identical DBL array due to limitations in the decimal formatting. Not the same! It is also significantly less efficient.
LabVIEW Champion . Do more with less code and in less time . -
How to connect captivate file in a database (MS SQL SERVER 2008)
Hi...
How to connect captivate file in a database (MS SQL SERVER 2008) ???
Kindly response please..
thanks!!!Hi there
See if the link below helps you out.
Click here to view
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks
Maybe you are looking for
-
I have not been able to back up in Time capsule since I upgraded my mac to MAC OSX Lion 10.7.5. Do I need a new external drive or an erased drive to get it to work with the lion software?
-
Nothing in Applications folder of "Install.dmg"
I created a Netinstall nbi using System Image Utility on OS X server 10.4.7. My cloned Intel iMacs (10.4.7 w/firmware upgraded) don't contain my new applications from the master image. When I look inside the Applications folder of my mounted Install.
-
Dynamic dns that supports RFC 3007
Apple's manual for Dynamic Host Configuration seems simple enough. Just find a dynamic DNS host that supports RFC 3007, log in, and you're ready. My problem is, after talking with dozens of Dynamic DnS providers, none support the RFC 3007 spec. Does
-
Report for delivery date in po
Hi Can anybody tell me in which report I can see the delivery date that vender confirmed? In ME2M can only desplay the date of PO created.
-
A recommended case with strap attachment?
My 89 year old friend who bought an iPhone recently really loves it - except for one thing. He has trouble getting it out of his shirt pocket and actually holding it without feeling like he is going to drop it. It is sort of user unfriendly to not ha