4 Replies Latest reply: Nov 30, 2013 7:25 AM by user13548965 RSS

    IMPORT/EXPORT CSV/TXT WITHOUT WEBUTIL (JavaBean)

    user13548965

      Hi Guys,

       

      In my office, i was use java beans to export (database to csv/xls/txt) with javabeans

      and now i need to import (from txt/csv to database). I have search from internet and i have no found

      except http://sites.google.com/site/jvrexcelproject/version-1-5-1-english

      but in this site, the link http://www.megaupload.com/?d=F7I13G1Y

      has broken...

       

      Please have me to find XLSUTIL.zip file from Mr. Jesus

        • 1. Re: IMPORT/EXPORT CSV/TXT WITHOUT WEBUTIL (JavaBean)
          Christian Erlinger

          I don't know what xlsutil is. Megaupload hast been down for some time. Why don't you share your requirement so we can see what we can came up with?

          The easiest way to import a CSV file would be via a external table resembling that CSV file; you'd need to put this file on the database server however; so it might not suit your needs. And of course external tables would have a database version dependency and as you didn't mention any version infos at all it's hard to tell if this solution is even available to you.

           

          cheers

          • 2. Re: IMPORT/EXPORT CSV/TXT WITHOUT WEBUTIL (JavaBean)
            user13548965

            xlsutil is the javabean made by mr. Jesus Valejo, he made it and upload at megaupload.

            My requirement is using javabean like mr. jesus have, but when i open his link has broken.

             

            Actually i can use webutil or use external table, but my big boss doesn't like that.

            He want use javabean in my oracle form, exam for direct print, date chooser, and exp/import database by csv/excel.

             

            My company use virtual server, that made my webutil so slowly to opened some form.

            That's why i used javabean to replace webutil function.

             

            Thank's for your reply bro.

            • 3. Re: IMPORT/EXPORT CSV/TXT WITHOUT WEBUTIL (JavaBean)
              Christian Erlinger

              Well, it's not said that Mr. Valejo is part of the OTN community. So the chances that he answers you over here are vague at best.

               

              The main reason why the webutil client io functions are slow is because they cause a network roundtrip for each line they read; to make the process faster you need to bulk that process up in order to save yourself the roundtrips. One solution is to transfer the file in question to the application server as a whole using the file upload functions and process it there using text_io.

               

              If you don't want to do that for whatever reason (maybe you don't like temporary files on the Application Server) then you have to write your own java bean to do so; in case of CSV Files this would be simple as you'd simply need a FileReader (Java Platform SE 6) to read the file on the client; just don't send the file line by line to the middle tier but read bigger chunks on the client and send them back to the Middle Tier.

               

              For XLS files it should be basically the same; however the java class library has no built in functionality to read .xls files, so you'd need a third party library for that. Apache POI - the Java API for Microsoft Documents would be one which works nice.

               

              cheers

              • 4. Re: IMPORT/EXPORT CSV/TXT WITHOUT WEBUTIL (JavaBean)
                user13548965

                Hi Chris

                 

                Thanks for your reply.

                I will try it