What's the best way to export UTF8 data into Excel?

Hi,
Database charterer set is UTF8
     PARAMETER     VALUE
1     NLS_NCHAR_CHARACTERSET UTF8
2     NLS_CHARACTERSET     UTF8
My requirement is that I want to export oracle data into excel file by using UTL_FILE oracle supplied package.
But while writing data into excel files it’s looses in UTF8 encoding and writes some garbage data into file.
I am very much sure that while retrieving the data form database it is perfectly encoded with UTF8, but after data is written to the file it eats the UTF encoding resulting into some garbage data.
e.g.
I am retrieving this filed from database which is UTF8 encoded in DB “Langäcker 55” but when it is written into excel it becomes “Langäcker 55”.
Is Oracle UTL_FILE eating the UTF8 encoding while writing into file? if yes, is there utility which can help me to remain the UTF8 encoding as it is while writing in to excel file? Is there anythingi can do in Oracle to get this done?
Thanks in advance.
Thanks,
Santosh

Until now I have not found anyone who could write real Excel files (MS binary format) in PL/SQL. So I assume that you write your data in strings separated by a character like ; or |, aka CSV.
Try to open your file with 'wb' (write binary) instead of 'w' and then use
-- write data
utl_file.put_raw(v_file,utl_raw.cast_to_raw(<your data>));
--write remaining data
utl_file.fflush(v_file);
--close the file
utl_file.fclose(v_file);Regards
Marcus

Similar Messages

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • What is the best way to export a cutterline from photoshop?

    What is the best way to export a cutterline from photoshop?
    Wie exportiere ich am am besten einen Schnittlinie aus Photoshop? Ich bekomme von einem Wort immer nur den ersten Buchstaben exportiert, obwohl alles gerastert auf einer Ebene liegt.
    Thank you! Vielen Dank!

    What are you talking about exactly?
    If you need to export vector data Photoshop is not the first choice but if you have Type Layers (without faux styles), Vector Masks or Paths it is possible.
    alles gerastert auf einer Ebene
    does not seem to make sense in this context though.

  • What is the best way to export a .csv/.txt file to a MS Windows shared folder via a scheduled job?

    What is the best way to export a .csv/.txt file to a MS Windows shared folder, when the export process is a scheduled job?

    You can't directly, as scheduled jobs can only export to server-side data stores, which can only write to the landing area. You'll need to use an external script (e.g. batch file) to move the file from the landingarea after export. You can use an external task in the scheduled job to invoke the script.
    regards,
    Nick

  • What is the best way to export a slideshow .I like to show my slideshows via appleTV on my TV

    What is the best way to export a slideshow.I like to view  the show trough AppleTV on my television.

    You don't really give us a lot of information to work with, and assume we know something about this mdeia player. The only way to get the slideshow to a media player is to export it from iPhoto. To where? Depends on the media player. Will iTunes work? Depends on the media player. Does the media player have a DVD drive? If so, then burning it to DVD with iDVD will work, but it will be standard def not HD.

  • HT204655 What is the best way to export a photo from OS X Photos to Photoshop?

    What is the best way to export a photo from OS X Photos to Photoshop?

    Just a note:  if you Option-drag the thumbnail to the Desktop you'll get the original file.  Regular dragging will get you the preview version or the edited version if it's been edited in Photos.

  • What is the best way to export a movie to avoid losing quality?

    I need to get a movie I made on a DVD somehow, but I seem to loose quality in color and overall sharpness when I take it into iDVD and burn a disc. This movie will be projected very large, so I need the best quality possible. What is the best way to export it for the highest quality?

    There's been a ton of testing reported here on this issue, but I don't think there is a consensus on the "best" method. For one thing, it depends on what you're starting with.
    In my experience with DV video and hi-res photos, it was tough to beat the result I got exporting "large" to the media browser. (Because of my DV footage, HD was not an option.) This made a H.264 file. I could only get a slight improvement by exporting via Quicktime to a H.264 file at double the resolution of the "large" file made by iMovie. Of course this took longer to export and for iDVD to encode. Overall, I'd say it wasn't worth it for the barely visible improvement. That improvement was only detectable in the slides, BTW, not in the DV video.
    Many recommend exporting to AIC, which should be an essentially lossless export out of iMovie. This is what the share to iDVD supposedly does, I got poor results with any flow that used an AIC file exported out of iMovie for use by iDVD. Never figured out why, but my results were always better if I compressed to H.264 on the way out of iMovie.

  • What is the best way to export for use on internet?

    what is the best way to export for use on internet?

    It depends. Is this for a personal web site or for a site like YouTube, Vimeo or Facebook?
    For YouTube, Vimeo and Facebook, use Publish & Share/Computer/AVCHD using one of the YouTube presets.

  • What is the best way to edit meta data..

    What is the best way to edit meta data and tag photos, faces, places etc. and have the data saved to the original photo.
    On a PC I would just use Windows Gallery. iPhoto on the Mac allows for some tagging, but it doesn't save to the original file.
    I like to have my photos in a folder, edit them and save the changes.
    What software would work best on a MAC to accomplish this?
    Thanks for any help,
    Nick

    iPhoto is a database and any metadata you add or edit is available in any app - if you learn how to use it.
    iPhoto is a non-destructive processor. It never touches the original file - it treats it like a film shooter treats the negative.
    If you want a copy of the original file with the metadata included simply export a copy.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    As an FYI:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • I am giving away a computer, what is the best way to wipe out data prior to depature

    i am giving away a computer, what is the best way to wipe out data prior to depature

    Did the Mac come with two grey disks when new? If so, use disk one to erase the drive using Disk Utility and then re-install the OS from the same disk. Once installed, quit and when the new owner boots they can set it up as a new out-of-the-box Mac when they boot it up. The grey disks need to be passed on with the computer.
    If you need detailed instructions on how to erase and re-install please post back.
    If the Mac came with Lion or Mountain Lion installed the above process can be done using the Recovery HD as since Lion no restore disks are supplied with the Mac.
    The terms of the licence state that a Mac should be sold/passed on with the OS installed that was on the machine when new (or words to that effect).

  • What is the best way to captue current date and time?

    I got a field in table to capute current date and time...i am
    using SQL Server.
    field name datatype length
    enter_datetime datetime 8
    What is the best way to get current date and time and insert
    to table?.
    Is this way?.
    <cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
    "&timeformat(#now()#,'hh:mm:ss')'>
    This way looks like time is not entered correctly.
    or any other better way?.

    > get current date and time and insert to table?
    You can use cfqueryparam
    <cfqueryparam value="#now()#"
    cfsqltype="cf_sql_timestamp">
    Or as was suggested, set the default for your table column to
    getdate(). Then you won't have to insert anything. Sql server will
    do it automatically when a new record is created.

  • What is the best way to turn line art into a 3D image in Illustrator? Thanks for your help.

    What is the best way to turn line art into a 3D image in Illustrator? Thanks for your help.

    What version of Illustrator? What do you mean by "Line Art"? What do you mean by "3d image"? Post images showing your starting artwork and an example of what you are trying to achieve.
    If you have Illustrator 12 or higher you can extrude or lathe a simple group or path using Effects > 3D > [Pick one]. You must start with vector data, not a placed raster image. You are very limited in what you can do, and you cannot model multiple objects within one 3D world. Each object you extrude/revolve/rotate is its own world, with its own perspective and camera. You can also make any art into a Symbol, then map that symbol onto any 3D surface you create. The results are, at best, acceptable, and often total garbage.

  • What is the best way to transfer my date from my old iMac to my new iMac?

    what is the best way to transfer my date from my old iMac to my new iMac? I don't have a time capsule, so I cannot use time machine.
    thanks

    Your best bet by far is to use Setup Assistant when the new Mac first starts up to transfer directly from the old one. 
    It's similar to Migration Assistant, but doing it that way will avoid having an extra user account.
    Either way, you can connect them via FireWire, Thunderbolt, or your network, but avoid wireless if at all possible.  You can connect both to your netwrork via Ethernet, or put a single cable between the two. 
    See Using Setup Assistant on Mountain Lion or Lion for details.

  • What's the best way to export for print?

    I usually upload images to my local photoprinting shop. What's the best way to do that with Lightroom? Since lightroom does the final sharpening in the print module, how do I get that into the exported file since there is no export function in the print module? Also, how do I get the proper dpi and sizing info into the photo for the print shop? Thanks.

    There is no good way to prepare images for printing from a file from a commercial printer by using Lightroom alone. You need to do an export of the image without any resizing or color space conversion, and then use some other program of your choice to 'finish' the file.
    It's just plain missing functionality... Lightroom assumes that you will be printing photos yourself and it is missing a whole lot of stuff in order to support external printing, including:
    a) Resize to exact pixel dimensions. Many labs require an exact pixel count for a given print size, so for example for an 8x10 they need a 2400 x 3000 pixel image. Can't be done in Lightroom.
    b) Trim adjustment. If you are doing full bleed photos (no margin), you might need to provide about 0.05 inch of 'trim space' to compensate for image loss during printing. Can't be done in Lightroom.
    c) Exporting to a specific printer profile. Can't be done.
    d) Adding margins, text, etc. Many times my clients want a 1/4 inch margin in their photos to facilitate framing, or I put a dim watermark type text in the bottom corner. Can't be done.
    My solution. Do most processing in Lightroom, do an export, and then do a second export via qImage on a PC. It does all of the above plus much more. It's just a matter of using the right tool for the job, and LIghtroom has no facilities at all for printing to a file.
    I have been asking for "Print to File" ever since I was under NDA during the betas.

Maybe you are looking for

  • How do I remove date/time stamp?

    Upon uploading the pictures into the Lightroom 'library' none of them appeared to have the date stamp that they did in camera. After a few minutes, the date stamp for each started to appear. Seeing that they first loaded without the date stamp leads

  • Year End 2009 Phase 2 Patch Number

    Does anyone know the Patch NUmber for the Year End 2009 Phase 2 Patch? I found the readme on line but I do not see the Patch Num ber used to download it: Release 11i Q4 2009 Statutory updates, Year End 2009 Phase 2, and 2010 Year Begin Readme [ID 976

  • Presets are foolish...

    Am I missing something or is Apple? In Lightroom and in Bridge, you can set image presets that span all types of image adjustments; white balance, levels, exposure, color, sharpening, etc. You can have one preset that saves all those settings. It app

  • Spreadsheet not opening from the cloud

    I have a number of Numbers, spreadsheets saved on the cloud. 2-3 of them will no longer open.  I have tried duplicating and renaming but neither option helps.  Does anyone know of any further options I can pursue?

  • Adventure1.0 won't deploy on Windows XP

    I need help getting the Adventure1.0 application to be installated and made runnable. I've run into an installation problem on Windows XP. I've installed j2eesdk-1_4_01-windows.exe, and can access the server via ports 8080 and 4848 just fine. I've fo