Is my code right about convert file into input stream?
InputStream is = new FileInputStream(file);
Parser ps = new Parser(file);
//create xml document
TXDocument doc = ps.readStream(is);
I am using j2sdk1.4 and IBM XML for java Parser v2.0
Thanks a lot
D
1 - JDBC is the wrong way to extract this data. It's like "What's the fastest way
to copy the Oxford English Dictionary using tweets?" I would research the
DBMS's bulk extract functionality.
2 - Are you dead-set absolutely sure you need to do this at all? What can you
do with the data all in one flat file that you cannot do with SQL access to the
data?
3 - If you want to convert all the columns into one (not that it's a huge
win or anything), you can use the DBMS's conversion and concatenation
functionality in your SQL. So instead of
"select col1, col2, col3, .... from MyBigTable"
do (change this to whatever conversion function syntax and concat syntax your DBMS needs)
"select convert(col1, varchar) concat ' ' concat convert(col2, varchar) concat ' ' concat convert(col3, varchar) ... from MyBigTable"
so the result set you get is a single column.
Joe
Similar Messages
-
Can i see an sample of a converted file into an excel format
can i see an sample of a converted file into an excel format
Preview can destroy a PDF file without even trying.
See -> http://khkonsulting.com/2013/06/preview-app-killer-of-pdf-files/.
Just don't use Preview to view or attempt to interact with PDF files.
Clinton -
How to convert files into DAT?
Does anyone know how to convert files into DAT? Not The other way around please.
This might do it:
http://www.videoconverterformac.com/dat-converter-for-mac.html
but can't imagine why you would want to! -
Does anyone know how to convert file into a .png?
Does anyone know how to convert file into a .png?
ThanksI tried to give an answer with less steps. I know it's a Pages file & all you have to do is select & copy the content in your Pages file & then open Preview.app. Next time I'll include the exporting to PDF & opening that in Preview.app or in Pages go to File > Print > click on the PDF button in the lower left of the print window & choose Open in Preview.
-
Convert result set into input stream
Hi,
I have result set with me having 93 columns with 1 lac rows. I want to download the result set as xls file.
Because of the data set size is large, i'm not able to hold the data in java object. So i'm trying to convert result set to input stream and giving this input stream to servlet output stream by specifying the contentType as text/xls.
I'm not able to convert result set into input stream.
Could you provide a solution here...
Thanks,
Rajesh1 - JDBC is the wrong way to extract this data. It's like "What's the fastest way
to copy the Oxford English Dictionary using tweets?" I would research the
DBMS's bulk extract functionality.
2 - Are you dead-set absolutely sure you need to do this at all? What can you
do with the data all in one flat file that you cannot do with SQL access to the
data?
3 - If you want to convert all the columns into one (not that it's a huge
win or anything), you can use the DBMS's conversion and concatenation
functionality in your SQL. So instead of
"select col1, col2, col3, .... from MyBigTable"
do (change this to whatever conversion function syntax and concat syntax your DBMS needs)
"select convert(col1, varchar) concat ' ' concat convert(col2, varchar) concat ' ' concat convert(col3, varchar) ... from MyBigTable"
so the result set you get is a single column.
Joe -
Document file or input stream is not set.
Error sending mail :Exception Thrown
oracle.apps.xdo.delivery.DeliveryException: Document file or input stream is not set.
at oracle.apps.xdo.delivery.AbstractDeliveryRequest.submit(AbstractDeliveryRequest.java:1154)
Delivery manager:
Can some one tell me what was wrong with this,
I check my document path I can describe it
When i send one attachment it works with the same path
but when I use multiple attachment it gives then error
Attachment m = new Attachment();
m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test.pdf","test.pdf","application/pdf");
m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test2.pdf","test2.pdf","application/pdf");
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_ATTACHMENT,m);
ThanksOk. What I needed to do is use the Bursting Engine to send out an email (list of invoices) to sales reps for our company. From what I read I have created an XML Document (Template) and have successfully ran that but it looks like I need to create a control file(bursting)? This control file would need to be saved as an XML? Is this correct?
-
Hi all,
I'm trying to convert a file into Base64 code and I'm not getting the result I expected. The file is attached to a Purchase Requisition and the process needs to run in background - this means I can't use FM's like GUI_UPLOAD to help me complete this task. Here is a portion of the code I'm using:
Get object information
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
folder_id = folder_id
object_id = object_id
TABLES
objcont = objcont.
READ TABLE objcont.
i_valor = objcont-line.
SEARCH i_valor FOR '='.
IF sy-fdpos <> 0.
i_valor = i_valor+sy-fdpos.
i_valor = i_valor+1.
SEARCH i_valor FOR space.
i_class = i_valor(10).
i_objid = i_valor+10.
ENDIF.
Get file phisical ID
CLEAR: log, phi.
log-class = i_class.
log-objid = i_objid.
CALL FUNCTION 'SO_LOIO_PHIO_GET'
EXPORTING
loio_object = log
IMPORTING
phio_object = phi
EXCEPTIONS
kpro_inconsistency = 1
x_error = 2
OTHERS = 3.
Get file content in binary
CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
EXPORTING
object_id = phi
raw_mode = 'X'
TABLES
file_access_info = access_info
file_content_ascii = cont_ascii
file_content_binary = cont_binary
EXCEPTIONS
not_existing = 1
not_authorized = 2
no_content = 3
bad_storage_type = 4
OTHERS = 5.
Retrieve base64 and invoke Webservice for upload
CLEAR: line2, first_time, last_block.
LOOP AT cont_binary.
DESCRIBE TABLE cont_binary LINES len_cont_binary.
MOVE cont_binary-line TO line_aux.
Check if it is last block
IF sy-tabix EQ len_cont_binary.
last_block = 'true'.
ELSE.
last_block = 'false'.
ENDIF.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = line_aux
IMPORTING
buffer = input_str.
CALL FUNCTION 'SCMS_BASE64_ENCODE_STR'
EXPORTING
input = input_str
IMPORTING
output = output_str.
If I compare my result in "output_str" I see it is different than when I use a software to retrieve the Base64, and when I try to open the file it is corrupted.
Can you help me?
Thanks in advance.
Kind regards,
RicardoHI Hyma,
As Stefan specifyed already as per my knowledge we dont have any standard procedure for all the requirements you specified.....we need to go for module in the adapter.
Cheers!!!
Naveen. -
I recently installed iTunes and the program transfered over my music from My music folder into iTunes it also started converting file types over. I had to stop the process of converting the file types and iTunes didn't completely convert all my files. How do I tell it to finish?
Thanks
AlexisJust read other articles re: livewire or what eveer it is. I went to add/remove programs and immediately got rid of it. I'm not sure how it got there and have talked to other users of my computer aboutit.
Was able to copy some of my songs (some of my own compositons from midi device even) but after update ipod, couldn't transfer more songs next time I tried. -
Questions about converting files in order to import to iMovie '09?
I was able to import the videos from my camera (.mts files) into iMovie '09, but now when I click Import from Camera, iSight opens up instead. Since I can't find out why it won't open up my camera files now, I have decided on just converting the files. I just have a question about converting though. The videos I recorded from my camera are in HD. They're very good quality. If I convert the videos from .mts into .mp4, would that reduce the quality of the video?
When that happens to me I get stubborn and make iMovie see the camera by shutting down and reopening iMovie, because I don't want another level of transcoding. If that doesn't work and you have a card reader of even better, a sd slot on your iMac, just plug the card in. If it appears on the desktop iMovie should see it, and if it appears on your desktop then iMovie should read it.
I have a Canon HFS 100 that works best if I take the card out and plug it into the computer.
The times I converted to .mp4, I thought the quality did degrade, because it had to be converted to .mp4 and then imported as AIC. But I am not an expert on whether iMovie can deal with .mp4 directly.
Canons require that one have the camcorder plugged into a power outlet, another reason to use a card reader.
What kind of camcorder do you have? With some camcorders, if one takes both photos and video, the video won't be read.
When nothing works, occasionally deleting iMovie preferences works.
Hugh -
Converting files into pdf format in java
Hi all,
How can we convert a file into PDF format in java?My application does the
file upload, and I need the files to be converted into PDF format.
The uploaded file can be of any type. How can I do this?
Please give me some help.
Thanks and regards,
Sandeep.>
How can we convert a file into PDF format in java?My application does the
file upload, and I need the files to be converted into PDF format.
The uploaded file can be of any type. ...>1) Write a class that will intelligently render a file of any type..
2) ... (well, do '1' first, then after getting your Nobel prize for AI, come back and we'll talk)
>
Please give me some help.>Please review your requirement.
BTW
- PDF sucks. It is designed for printing, and I (for one) don't want to kill more trees, and have no printer.
- This subject (convert file to PDF) has been discussed on the forums a bazillion times. Did you search the forums before asking your two (very closely related) questions? -
Hi expert,
I want test some Function Module, and for do this i need to convert a generic file (pdf doc txt) into XSTRING... And after convert XSTRING into file, with use mimetype to read this...
I search into FM, and in SDN but i don't find anything, can someone help me to do this??
Thank you all...Hi,
Check if FM SCMS_FTEXT_TO_XSTRING can be of help.
Regards, Bert -
Converting files into PDF/A format
Hello,
My main questions are:
1) How can I convert a normal document (say, word document) into PDF/A format using Adobe Acrobat 8.0 standard (that's what we use in the office)?
2) When we convert a file into PDF using Adobe Acrobat, does it save the file automatically in PDF/A format or is it normal PDF?
3) How can I tell if a file is in PDF/A format? Will it have a different extension than PDF?
4) What disadvantages are there related to PDF/A format (if any)?Thanks pogopossum,
I'm using now Goodreader. This has also the advantage of a good interlinking to other available documents.
This is also not functioning with ibooks. Goodreader has some drawbacks compared to ibooks.
You cannot recognize the books easily since no frontpages are present and you need to scroll more to find the correct document. A annoying thing is that once you enlarge the index and jump to a linked page that page will show up in the enlarged fashion. So you always need to resize the new page. This problem is not present in ibooks. An enormous good feature of Goodreader is the easy and many ways to import files. -
About download file into unix file
Hi expert,
i use the openset to write file into unix file server.
but why there are some space at the end of every line.
by the way, i works very well in windows server
DATA: DATA_TRANSFER(70).
Data: DATA_TRANSFER type string.
data: fine_riga1(1) TYPE X VALUE '0D0A'.
DATA: gt_data TYPE STANDARD TABLE OF ty_data.
Constants: ascii_tab type x value ','.
field-symbols: <f> type any, <delim> type any.
"Assign delimiter field such as tab or comma.
assign ASCII_tab to <delim>.
CLEAR VN_CNT.
concatenate DSNU 'employee' PN-BEGDA SY-UZEIT into P_UNIX.
OPEN DATASET P_UNIX in legacy text MODE FOR OUTPUT. " IN TEXT MODE encoding UTF-8.
IF SY-SUBRC <> 0.
WRITE: / 'Error on file open:', P_UNIX.
ELSE.
LOOP AT TI_DATA .
CLEAR DATA_TRANSFER.
concatenate TI_DATA-TYPE
TI_DATA-PERNR
TI_DATA-ZAUSW
TI_DATA-ENAME
TI_DATA-TERID
INTO DATA_TRANSFER separated by cl_abap_char_utilities=>HORIZONTAL_TAB.
CONDENSE DATA_TRANSFER NO-GAPS.
TRANSFER DATA_TRANSFER TO P_UNIX.
ADD 1 TO VN_CNT.
CLEAR DATA_TRANSFER.
ENDLOOP.
CLOSE DATASET P_UNIX.
ENDIF.
WRITE: / P_UNIX,
/ 'Transfered', VN_CNT, 'records'.
Best Regards,
KevinHi,
Try this way...
TRANSFER dobj TO dset [LENGTH len]
[NO END OF LINE].
Addition 1
... LENGTH len
Effect
This addition determines how many characters or how many bytes of data object dobj are written to the file. len is expected to be a data object of type i that contains the number of characters or bytes. In text files, the content of len specifies the number of characters that are written from the storage. For binary files, legacy text file, and legacy binary files, len specifies the number of bytes that are written to the file. The first len characters or bytes are transferred and alignment gaps are included in the structures. If the addition LENGTH is not specified, all characters or bytes are transferred.
If the value of len is less than or equal to 0, no characters or bytes are transferred. If the file is opened as a (legacy) text file, however, a line end marker is inserted into the file by default. If the value of len is greater than the number of characters or bytes in dobj, hexadecimal 0 or blank characters are transferred to the file instead of the missing bytes or characters, depending on whether the file was opened as a (legacy) text file or a (legacy) binary file. -
T-code to upload mutliple files into SAP directories ?
Hi,
Is there any other transaction to upload multiple files into SAP directories ( ALL11) other than CG3Z ? Any other procedures at the operating system level ? Please advise.
Regards
ShivaI dont think so. But you can :
-- Ask your developer to create a BDC for this transaction to upload multiple files.
-- Use LSMW to record this transaction to upload multiple files.
Regards,
Jazz -
Advise about loading File into table in Oracle 8i
Hello there, i need help about something i need to do and i dont know if exist a way in Oracle 8i to do it.
My problem is:
I have a File that has records like:
<code>
data1a|data1b|data1c|data1d
data2a|data2b|data2c|data2d
data3a|data3b|data3c|data3d
dataNa|datanNb|dataNc|dataNd
</code>
The data in this file i need to put into a table with 4 columns like
<code>
create table DataFromFile(
columnA String,
coumnB String,
columnC String,
columnD String
</code>
Exist a way to do this like calling an Stored Procedure and give as input the FILE? or that a JOB can LOAD the file and insert data into the table?
I am not allowed to load the file with Java (in example) and parse it and then insert records... i need to do it by the DB Oracle 8i directly or by a java program that pass the file.
Thanx for any advise u can give me :Dthanx so much to both for answer in my question... im gonna study about yours tips
i actually use JEE in a Weblogic 10.2 server and i need to take a file and load its data into an oracle 8i table but im not allowed to make inserts for every record in the file :(
if u have more suggestions i will study too :) its good to learn other alternatives to solve this issue :)
thanx again
Maybe you are looking for
-
Missing follow-up option in calendar app
Dear BlackBerry, The help section of my Q5 states that as of version 10.2.1.2102 there should be a "follow-up" option on the right hand menu in an opened event. That particular option seems to be missing however. Can you help? Regards, Sander Keuris
-
How to display differnt time fields in a single column?
Hello Sir, I am trying to display the records which show the table with 3 columns filename,Date,status using jsp. I am fetching the records from the DB and displaying them using jsp ,connection,resultset, <table> etc. what i wanted to display is just
-
Hi , There is a requirement to add a new field in MIRO screen. I mean that a new field needs to be made visible. Please let me know of how to proceed with it in SPRO. Thanks
-
Responsible Service Org and Service Team (partner function)
Hi all CRM gurus, I'm trying to understand the reasons behind the following design and I hope someone can clarify some points for me: 1. Organisation structure in CRM is set up with service organisation followed by service team, e.g. ABC Company |_Ca
-
RAM for K9N4 SLI (MS-7325)
I already had two gigs (1x2) of RAM installed on my computer. So today, I went out and bought two more gigs (1x2) of Corsair DDR2 PC6400 (800MHz) RAM. I had to have one of the people at Tiger Direct help me decide which to buy (I didn't know exactl