Importing CSV into table - problem with tab-deliminated files

Hi All,
I have written an application based on well-known Uploading excel sheet using Oracle Application Express (APEX) example from the following site:
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
All works as expected...
However the code in the example assumes that the CSV file is really comma-delimited file:
v_line := REPLACE (v_line, ',', ':');
Now, I have noticed that when different people use "Save as CSV" function in Excel they sometimes get different results. For example sometimes you get a file which is semicolon delimited (';').
However, I need to process a file which is tab-delimited file. Thinking is was quite simple task I simply change the above line of code to:
v_line := REPLACE (v_line, chr(9), ':');
where chr(9) is the ASCII code for horizontal TAB
I was very surprised however to see that if I process the tab-delimited file with the above line I receive an extra character between EVERY CHARACTER. To give you an example:
1) When processing a normal comma or semicolon delimited file using v_line := REPLACE (v_line, *','*, ':'); or v_line := REPLACE (v_line, *';'*, ':'); I receive correct results:
SQL> select contract_value,dump(CONTRACT_VALUE) from sdpr_upload;
CONTRACT_VALUE DUMP(CONTRACT_VALUE)
354000 Typ=1 Len=6: 51,53,52,48,48,48
555569 Typ=1 Len=6: 53,53,53,53,54,57
2) When processing a TAB-DELIMITED file using v_line := REPLACE (v_line, chr(9), ':'); I get this:
SQL> select contract_value,dump(CONTRACT_VALUE) from sdpr_upload;
CONTRACT_VALUE DUMP(CONTRACT_VALUE)
3 5 4 0 0 0 Typ=1 Len=13: 0,51,0,53,0,52,0,48,0,48,0,48,0
5 5 5 5 6 9 Typ=1 Len=13: 0,53,0,53,0,53,0,53,0,54,0,57,0
Now the BIG QUESTION ARE:
Where do these 0's come from? How to get rid of them?
Many thanks for any pointers!
Pawel.

Thanks for the tip, however the problem is to actually load the tabbed file.
I think the issue lies somewhere else. I see some weird characters in the export file when viewing it in Linux vi. So I am guessing this could be some unnicode conversion problem rather than any issue with the application or script.
Is there anyway one could upload a UNICODE text file into Apex?

Similar Messages

  • Importing Word into InDesign, problem with styles

    OS 10.6, CS5
    Hi everyone,
    Does anyone have any experience with importing styled Word docs into InDesign?
    Editors style their Word documents with some basic styles (Text, References, Headline, etc.) using a Word template that I created. Designers use import options to match the Word styles to the ID styles. This worked fine in Word 2004 and InDesign CS3: Word  "text" style would map on import to the InDesign "text" style, even though they had totally different attributes. Superscripts, italics, etc. would be respected as local overrides in InDesign.
    Then we upgraded to CS5. Automatic mapping on import no longer seems to work: After importing text, all the styles in InDesign have local overrides assigned to them that don't make sense (hyphenation exceptions, tab settings). So I'm left with importing the Word styles, using auto-renaming so that InDesign explicitly does NOT match styles.
    Then delete the Word styles one by one from the paragraph style panel, replacing with the desired ID style.
    This has gone on for several months and we've now upgraded to Office 2011 but that hasn't solved the problem.
    With Word 2011 docx files, the import works almost like it did in CS3, the styles almost come in cleanly: If the style in Word has NO local overrides, such as italics or superscripts, the InDesign style is correctly applied. The problem is those local overrides in Word--InDesign not only respects the italic or superscript, it also respects the font attribute. All the Word styles are Times New Roman so all superscripts in InDesign are coming in as superscript + TNR. (see screenshot)
    Are we left with our original work-around? Importing styles then manually deleting and replacing them?
    This is frustrating because it used to be smooth and seamless and while some new features of CS5 are great, it's annoying that it's broken this fundamental function!
    I've tried saving the Word files as doc or rtf instead of docx but this doesn't make a difference in this problem.
    Any help or advice would be much appreciated.

    I'm an author / publisher.  I write in Word and I publish with InDesign. When I'm in the review stages, I like to edit my text in Word, so I export the text as an RTF.  When I import it back into InDeisgn I often find that some of the styles have annoying overrides from Word that break things.  (1) Paragraph style stuff about hyphenation and (2)  Characters style stuff about  Character direction: Left-to-Right style.
    * Easy global  fix:  select the whole text open the Window | Style | Paragraph window, and click the button on the bottom to remove all overrides. And do the same for the Window | Style | Character window. Before doing this, I like to check that I don’t have any italics that are in the file as overrides rather than being in there as part of a header style or as part of the Emphasis style that I try to use throughout the text instead of just an italic override. It makes me uneasy to remove all overrides, as I always worry there might be an important one I could have kept.
    * (1) Specific fix for the hyphenation overrides: Make sure the hyphenation settings in the individual InDesign paragraph styles match, so far as possible, the Word global hyphenation settings in the Page Layout | Hyphenation dialog of Word.    InDesign will import any Word hyphenation settings that don’t match the InDesign doc styles as overrides.
    Specifically,  set InDesign Hyphen Limit to ( say) 1 and set Word | Hyphenation | Hyphenation Options | Limit consecutive hyphens to the same number (say) 1. Also set InDesign Paragraph Style Hyphenation | Hyphenation Zone to (say) 0.5” and set Word | Hyphenation | Hyphenation Options | Hyphenation Zone to the same number (say) 0.5”.  And turn off all the InDesign optional hyphenation check boxes at the bottom of the dialog, and the turn off the two check boxes in the Word Hyphenation Options box as well.In Word you should also set Hyphenation | Automatic.  If you cautiously set Word Hyphenation | None the import will throw a “Hyphenation” override on the hyphenated paragraph styles, even though this maikes no sense.
    You may still pick up some hyphenation related overrides on your heder styles, if you have set the headers not to hyphenate.  You can either dump the overrides in InDesign or you can set your header styles to hyphenate…and be careful not have any headers actually be longer than one line.
    (2) I still haven't found the fix for the Left-to-Right text override.

  • Large insert into tables, problems with rollback

    I have applications that inserts or updates a large number of records. After each insert or update a commit is issued, it would release rollback area. But after some time running, i receive an error message about no space in rollback area. How can i force a write into disk to release rollback area ?
    Thanks.

    Sounds like your still running out of space in your rollback segment with your transaction being too big - as Oracle should always write the rollback segment to disk upon commit. What might help is to specify a rollback segment you want to use for the transaction or use the 'no logging' option - though this means you can't rollback - and if anything bad happens you can end up with an unhappy database. My suggestion would be to create a much larger rollback segment and pin the statement to that rollback segment, you can even switch the rollback segment on and off again just for this transaction.
    Hope that helps

  • Problem with Tabbing Order in LiveCycle

    I have a two page form.  The last field on the second page is an image field (the user can attach a graphic).  The problem is it won't tab back to the first page after this field.

    I, too, am having problems with tab order.
    I have a two-page form created in LiveCycle Designer. There are 66 fields on the 1st page of the form, and 65 fields on page 2. When I use Window > Tab order to examine the tab order, all is as it should be (except for one thing, discussed later). However, when I go into the Preview PDF tab (or load the form in Acrobat X Pro), field 4 on page 1 tabs to field 42 (on page 1). Additionally, tabbing from field 41 on page 1 takes me to field 43 on page 2.
    I can use Action Builder to ensure that the tab goes to the appropriate field, but that seems a rather kludgy way to go about it.
    And that additional problem: I've got three text fields on page 1 that are of type Protected. According to the documentation, "The protected field is not included in the tabbing sequence and it does not generate events.", yet all three fields are in the tab order.
    What (if anything) am I doing wrong?
    Thanks.

  • I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?

    I burned a playlist to a data CD using itunes 11 but what is best way to get it import it into another computer with itunes running?  I get an "X" when trying to copy to the "automatically add to itunes" folder on the 2nd computer.

    ok... so i i just made sure all my music is all together in 1 folder and i am going to trash my old music folder that is in the itunes folder... and follow your directions - let itunes start w/new library and bring my music in. Well, last little hurdle/question. I noticed that the place where my itunes library is - on an external drive doesnt have much space left on it. The place where i gathered all my music together in order to start fresh - is a different external drive and has LOTS of free space on it.
    SO... i now would like to just keep all that freshly compiled clean music right where it is but in advanced preferences I want to point to that new folder on the drive that has so much more space. So... should i delete the old music then go into itunes with a blank library and change the folder in preferences - quit and go back in and then follow your steps to loading my music? If i change the setting of where itunes looks for the music - that doesn't wipe out the old stuff... it just mixes it all up together right? I dont want that!!
    i promise this is the last question - i would love to fix this problem tonight and just be DONE!
    Thanks in advance for your patience and knowledge!!
    Lisa

  • Office Web Apps Server 2013 - Word Web App - Problem with Tab space

    Hello We have Office Web Apps Server 2013 running with SharePoint 2013.  Users Editing a Word document with Office Web Apps, can't use "Tabs", any Word document with Tabs; the tabs are replaced with a single space.
    Has anyone noticed this?  Is this a bug?
    -thanks
    thomas
    -Tom

    Yes, currently the Word Web App does not support
    Tab Keyboard shortcut for editing document content .
    For more information, you can have a look at
    the article:
    http://office.microsoft.com/en-us/office-online-help/keyboard-shortcuts-in-word-online-HA010378332.aspx?CTT=5&origin=HA010380212
    http://social.technet.microsoft.com/Forums/en-US/3f5978d3-67a1-4c8c-981f-32493d72610b/office-web-apps-server-2013-word-web-app-problem-with-tab-space?forum=sharepointgeneral

  • Problem with tabbed panel

    I have a problem with tabbed panel...this panel has 3 columns, I copied to each of them a diffrent text (diffrent height)...I expected to obtain diffrent working area of column, for example  1st column-height 7500 px, 2nd-1500 px, 3rd-2500 px, but I received one height 7500 px, each column has been formatted to this size....below a text I have “empty space”- (it is a diffrence between working area and text area)...I put the text to the 1st column for example 7200 px height, empty space below this text is 300 px I received 7500 px of working area in this column, here the problem doesn`t exist but….2nd column i have height of text for example 1300 px, below this text i have 6200 px empty space...It should be height 1300 px of text and maybe 200 px of empty space...so the working area could have at 1500 px not 7500 px of height....I try to change it (to for example 1500 px) but it still  return to the basic 7500 px height and can`t do  it...The solution is to use another form like. the accordion form..but it is a row form….when you put a diffrent sized text (height) you will receive diffrent size of working  area (height), you obtain 7200px text +300 px empty space=7500 working area in 1st row.. 1200 px text + 300 px empty space=1500 workin area px in 2nd row and 2500 working area px in 3rd row…everything is fine in this form…each row has been formatted to the different size of height…but I prefer to use a tabbed panel (column form) instead a accordion form.…I don`t to waste the time to correct the code in html text editor like PSPad…
    Best Regards
    Kamil

    A couple of threads here that should answer your query.
    http://forums.adobe.com/message/5080345
    http://forums.adobe.com/message/5104253
    Thanks,
    Vinayak

  • Filming on a Panisonic 24p camera but I imported it into final cut with a

    Filming on a Panisonic 24p camera but I imported it into final cut with a Sony HD camera. Will this mess up the quality of of my shots when I ad slow motion? I have noticed that the slow mo is a little chopy. PLEASE HELP!....

    24p is captured with your standard "DV-NTSC" easy setup, whereas 24pA is captured with the "DV-NTSC 24p (23.98) Advanced Pulldown" easy setup. Correct me if I'm wrong I still have yet to work in 24pA.
    http://www.kenstone.net/fcphomepage/24p_in_FCPnattress.html
    This page is priceless.
    http://www.nattress.com/Solutions/solutions.htm
    This page is nice too for reference

  • I've run into a problem with my trail version of Adobe Premier 13, and it appears to be a major one.

    I’ve run into a problem with my trail version of Adobe Premier 13, and it appears to be a major one. Here’s what happened.  Yesterday when I turned on the computer, I got a prompt asking if I wanted to link my Adobe Lightroom with Adobe Premier.  I “x’d” the prompt but then the computer went into a “do not turn off” mode.  45 minutes later the computer was still prompting me not to turn it off. Thinking that the computer was hung up I did turn it off.  Then I turned it back on, went to Adobe Lightroom to discover that all my work from the past three-to four years had disappeared. 
    At this point I am afraid to mess with Adobe Premier, so it’s still on my computer.  I used Windows 7, Photoshop CS3 and Lightroom 4.  Do you think if I uninstalled my trial version of Adobe Premier 13, my work on Lightroom would return?  Or is it lost?
    Thanks to any who offer suggestions. 
    Bert Gildart

    Bert Gildart
    I was unaware that you could establish any direct linkage between Lightroom and Premiere Elements. Are you sure that the association was to be for  Photoshop CS3 and Lightroom?
    Have you tried to do a System Restore to a point before you installed Premiere Elements 13 or before you OK'd whatever this Lightroom linkage was?
    Have you asked your question in the Adobe Lightroom Forum, asking about recovery of work lost from Lightroom? Have you found any traces of your lost Lightroom work in the Recycle Bin?
    ATR

  • My i phone was stolen and now I need to upload my contact to my i cloud from my I tunes...any ideas how to import contacts into i cloud, with either i tunes or with old iphone

    My i phone was stolen and now I need to upload my contacts to my i cloud from my I tunes...any ideas how to import contacts into i cloud, with either i tunes or with old iphone?

    If you have the contacts on the phone you can sync the phone to the computer. The contacts should then show in address book. At this point you can sync the address book data to iCloud. You have to make sure the iCloud account is setup on the computer and this will not work unless the computer is running 10.7.2 of course. There are other ways to add the contacts to iCloud like through the phone but the phone must be running iOS5. If it is you can simply add the cloud account to the phone and toggle the contacts slider. You will get a prompt to keep or delete the contact data. Of course you keep. Then you will get a prompt to merge at which point you do. This should merge the contacts on the phone with iCloud. Hope this helps.

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Problems with embedding .flv files in DW CS4....

    I inserted an .flv file into my DW CS4 html page. I previewed it in my browser, and it worked for a little bit, but now it's not working in any browser, I'm not sure what happened. I included a screen shot in the attachments of what was happening in all the browsers.
    Thanks for any help,
    Thank you,
    Aza

    Not sure if that was meant for me
    You can tell who was the intended recipient by looking at the header of the message -
    6. Sep 10, 2010 6:50 AM in response to: FordGuy48 <<----
    Re: Problems with embedding .flv files in DW CS4....
    A link to the page would help us diagnose your problem.
    Safari tells me that this file -
    FLVPlayer_Progressive.swf
    is not where you have told the page to expect it.  Did you upload it?

  • Problem with reading config file

    Hello,
    I have problem with reading config file from the same dir as class is. Situation is:
    I have servlet which working with DB, and in confing file (config.pirms) are all info about connection (drivers, users, passw, etc.). Everything work fine if I hardcoded like:
    configFileName = "C:\\config.pirms";I need to avoid such hardcoding, I tryied to use:
    configFileName = Pirms.class.getClassLoader().getResourceAsStream ("/prj/config.pirms").toString();but it isn't work.
    My config file is in the same directory as Pirms.class (C:\apache-tomcat-5.5.17\webapps\ROOT\WEB-INF\classes\prj)
    Also I tryied BundledResources, it isn't work fo me also.
    Can anybody help me to solve this problem? with any examples or other stuff?
    Thanks in advance.
    Andrew

    Thanks, but I am getting error that "non-static method getServletConfig() cannot be referenced from a static context"
    Maybe is it possibility to use <init-param> into web.xml file like:
    <init-param>
      <param-name>configFile</param-name>
      <param-value>/prj/config.pirms</param-value>
    </init-param>If yes can anybody explain how to do that?
    I need to have that file for:
    FileReader readFile = new FileReader(configFile);Thanks in advance.

  • HT201210 i have problem with the firmeware file...and I do not know what is that

    i have problem with the firmeware file...and I do not know what is that

    Make sure you are updating your phone the correct way, by connecting to iTunes and clicking Check for Updates on the Summary tab of your iTunes sync settings.  Do not try to download the firmware file from the internet first.  Also be sure iTunes is up to date before updating.
    Delete the existing firmware (.ipsw) file and try again.  You will find it at one of the following locations:
    Mac OS X: ~/Library/Application Support/MobileSync/Backup
    Windows XP: %AppData%\Apple Computer\MobileSync\Backup
    Windows Vista: %AppData%\Roaming\Apple Computer\MobileSync\Backup
    Windows 7: %AppData%\Roaming\Apple Computer\MobileSync\Backup

  • Problems with some PDF files

    Hi,
    I have problems with some PDF files. After clicking on link to the file Safari shows me insted of normal document (which is working on Windows) hashes, numbers etc like it was a problem with coding or something. First I was using Preview, I though that maybe installing Acrobat Reader with plugins will solve the problem, but ofcourse it didn't. Did somebody has this same problem?

    Back up all data.
    Please triple-click anywhere in the line below on this page to select it:
    defaults delete -app Safari WebKitOmitPDFSupport
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Quit Safari. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign (“$”) to appear below what you entered. You can then quit Terminal. Test.

Maybe you are looking for

  • Restoring problem, Out of Free space

    OK, here is my problem. I am trying to restore from a backup and I get the following message: iTunes could not restore the iPhone "iPhone" because the backup could not be saved on the computer. Additionally my computer will say Low Disk Space: You ar

  • Bigger on firefox than on Chrome

    I am developing a website and I am doing my best to make look the same on all browsers. I started developing the website on Chrome. I then tried it on Firefox and noticed how the website (images, text, etc) look much bigger on firefox then on Chrome.

  • I have lost the line that shows tools the toolbar how do I get it back please

    At the top of the page there used to be a toolbar that showed all the options so that I could go to Tools etc and do certain things I wanted to. I have clicked something and can no longer find it. How do I get it back please?

  • Rman controle file backup

    hi, RMAN>backup database on executing the above command does rman backsup the control file also???? Edited by: 793097 on Dec 7, 2010 12:49 AM

  • Are italic tags broken in Flash CC? Bug?

    I noticed that my <i> italic tags stopped working when I switched from CS6 to CC. If I create a fresh FLA, add a dynamic TextField, embed both Arial Regular and Arial Italic, then do this: two.htmlText = "These are BR tags: <br/><br /><i>this is in a